Memory pages not released by the filesystem after a truncate

2016-07-05 Thread Houssem Daoud
Hi,

My system experiencing problems with atomic memory allocations. Device 
drivers are not able to allocate contiguous memory regions due to a high 
fragmentation level.

At the time of failure: /proc/meminfo shows the following information:
MemTotal: 4021820 Kb
MemFree: 121912 Kb
Active: 1304396 Kb
Inactive: 2377124 Kb

Most of the memory is consumed by the LRU inactive list and only 121 Mb 
is available to the system.
By using a tracer, I found that most of the pages in the inactive list 
are created by the ext4 journal during a truncate operation.
The call stack of the allocation is:
[
__alloc_pages_nodemask
alloc_pages_current
__page_cache_alloc
find_or_create_page
__getblk
jbd2_journal_get_descriptor_buffer
jbd2_journal_commit_transaction
kjournald2
kthread
]

The problem is easily reproducible using the following script:
#!/bin/bash
while true;
do
dd if=/dev/zero of=output.dat  bs=100M count=1
done

Is that a normal behavior ? I know that the philosophy of memory 
management in Linux is to use the available memory as much as possible, 
but what is the need of keeping truncated pages in the LRU if we know 
that they are not even accessible ?

The problem of the inactive list growth occurs only with the journal 
mode of ext4, not with the write-back mode.

A chart representing the utilization of memory during the test is 
provided in this link: 
http://secretaire.dorsal.polymtl.ca/~hdaoud/ext4_journal_meminfo.png

Thanks,
Houssem


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Bios , Mbr, Grub

2016-07-05 Thread Ricardo Ribalda Delgado
https://git-scm.com/book/en/v2
On 5 Jul 2016 08:16, "Gnoleba GNOGBO"  wrote:

> Hi Ricardo !
>
> Your link is wrong : not found
> Gnoleba
> Le 4 juil. 2016 12:10, "Ricardo Ribalda Delgado" <
> ricardo.riba...@gmail.com> a écrit :
>
>> git clone git://git.savannah.gnu.org/grub.git
>> find grub/boot/i386/pc/
>>
>>
>> On Mon, Jul 4, 2016 at 11:00 AM, Gnoleba GNOGBO 
>> wrote:
>> > Hi !
>> >
>> > I had read a lot of book and link about initialization of the boot
>> starting
>> > of linux.
>> >
>> > I read that , after the post by the bios the mbr is loaded in memory
>> which
>> > routine load this sector ?
>> > In this sector  of 512 bytes we have 440 bytes for a routine what is the
>> > function of this routine ? When this routine is executed ? The 2 bytes
>> with
>> > 0xAA55 what is its function ? Who load it in memory ? And the all book
>> i had
>> > read said the mbr load the loader grub How ? And the grub launch the
>> kernel,
>> > ok . How this grub is load ? By which programm ?
>> > So, i would like that someone give me the names of routines, the order
>> of
>> > their launching and which load or execute what until the grub exécution
>> ?
>> >
>> > Thank you for your help.
>> > Greg i am waiting a lot from you !
>> >
>> > Best regards
>> > Gnoleba GNOGBO
>> >
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >
>>
>>
>>
>> --
>> Ricardo Ribalda
>>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Bios , Mbr, Grub

2016-07-05 Thread Gnoleba GNOGBO
Hi Ricardo !

Your link is wrong : not found
Gnoleba
Le 4 juil. 2016 12:10, "Ricardo Ribalda Delgado" 
a écrit :

> git clone git://git.savannah.gnu.org/grub.git
> find grub/boot/i386/pc/
>
>
> On Mon, Jul 4, 2016 at 11:00 AM, Gnoleba GNOGBO 
> wrote:
> > Hi !
> >
> > I had read a lot of book and link about initialization of the boot
> starting
> > of linux.
> >
> > I read that , after the post by the bios the mbr is loaded in memory
> which
> > routine load this sector ?
> > In this sector  of 512 bytes we have 440 bytes for a routine what is the
> > function of this routine ? When this routine is executed ? The 2 bytes
> with
> > 0xAA55 what is its function ? Who load it in memory ? And the all book i
> had
> > read said the mbr load the loader grub How ? And the grub launch the
> kernel,
> > ok . How this grub is load ? By which programm ?
> > So, i would like that someone give me the names of routines, the order of
> > their launching and which load or execute what until the grub exécution ?
> >
> > Thank you for your help.
> > Greg i am waiting a lot from you !
> >
> > Best regards
> > Gnoleba GNOGBO
> >
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
>
>
> --
> Ricardo Ribalda
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies