public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with mballoc and uninit_groups option
@ 2008-01-11 14:04 Valerie Clement
  2008-01-11 15:45 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 3+ messages in thread
From: Valerie Clement @ 2008-01-11 14:04 UTC (permalink / raw)
  To: ext4 development

Hi,

I've got problems with mballoc when I create the ext4 filesystem with 
the "uninit_groups" option enabled.

First, I do a single test on a filesystem created without the 
"uninit_groups" option and mounted with the defaults option:
   dd if=/dev/zero of=/mnt/test/foo bs=1M count=1024

In this case, the file blocks are allocated in the groups 4, 5, 6, 7, 8, 
9, 10.

When the filesystem is created with the "uninit_groups" option enabled 
and mounted with the defaults option, I do the same dd command.

In this case, the file blocks are allocated in the groups 5, 7, 9, 25, 
27, 49, 81. It seems that the blocks could be allocated only in the 
already initialized groups.

Who knows how to fix that?

   Valérie

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with mballoc and uninit_groups option
  2008-01-11 14:04 Problems with mballoc and uninit_groups option Valerie Clement
@ 2008-01-11 15:45 ` Aneesh Kumar K.V
  2008-01-14 14:05   ` Valerie Clement
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2008-01-11 15:45 UTC (permalink / raw)
  To: Valerie Clement; +Cc: ext4 development

On Fri, Jan 11, 2008 at 03:04:08PM +0100, Valerie Clement wrote:
> Hi,
>
> I've got problems with mballoc when I create the ext4 filesystem with  
> the "uninit_groups" option enabled.
>
> First, I do a single test on a filesystem created without the  
> "uninit_groups" option and mounted with the defaults option:
>   dd if=/dev/zero of=/mnt/test/foo bs=1M count=1024
>
> In this case, the file blocks are allocated in the groups 4, 5, 6, 7, 8,  
> 9, 10.
>
> When the filesystem is created with the "uninit_groups" option enabled  
> and mounted with the defaults option, I do the same dd command.
>
> In this case, the file blocks are allocated in the groups 5, 7, 9, 25,  
> 27, 49, 81. It seems that the blocks could be allocated only in the  
> already initialized groups.
>

That is because we skip the uninitialized group in ext4_mb_good_group.
I guess we are trying criteria 0 allocation and we skip uninit group for
criteria 0 . You can tune by setting higher value for
/proc/fs/ext4/partition/orders2_req. Setting it to a high value would
skip criteria 0 allocation for small requests.

I guess you are using delayed allocation ?

-aneesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with mballoc and uninit_groups option
  2008-01-11 15:45 ` Aneesh Kumar K.V
@ 2008-01-14 14:05   ` Valerie Clement
  0 siblings, 0 replies; 3+ messages in thread
From: Valerie Clement @ 2008-01-14 14:05 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: ext4 development

Aneesh Kumar K.V wrote:
> On Fri, Jan 11, 2008 at 03:04:08PM +0100, Valerie Clement wrote:
>> Hi,
>>
>> I've got problems with mballoc when I create the ext4 filesystem with  
>> the "uninit_groups" option enabled.
>>
>> First, I do a single test on a filesystem created without the  
>> "uninit_groups" option and mounted with the defaults option:
>>   dd if=/dev/zero of=/mnt/test/foo bs=1M count=1024
>>
>> In this case, the file blocks are allocated in the groups 4, 5, 6, 7, 8,  
>> 9, 10.
>>
>> When the filesystem is created with the "uninit_groups" option enabled  
>> and mounted with the defaults option, I do the same dd command.
>>
>> In this case, the file blocks are allocated in the groups 5, 7, 9, 25,  
>> 27, 49, 81. It seems that the blocks could be allocated only in the  
>> already initialized groups.
>>
> 
> That is because we skip the uninitialized group in ext4_mb_good_group.
> I guess we are trying criteria 0 allocation and we skip uninit group for
> criteria 0 . You can tune by setting higher value for
> /proc/fs/ext4/partition/orders2_req. Setting it to a high value would
> skip criteria 0 allocation for small requests.

Hi Aneesh,
thanks for your answer but I'm not sure your solution is the right one 
to fix the problem.

I added traces in the mballoc code and found perhaps something 
incorrect: while running the dd command, the function 
ext4_mb_init_cache() is called, which calls ext4_init_block_bitmap() for 
an uninitialized group. But the flag EXT4_BG_BLOCK_UNINIT is not reset 
after. Shouldn't it be reset here?

> I guess you are using delayed allocation ?
Yes

   Valérie

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-14 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 14:04 Problems with mballoc and uninit_groups option Valerie Clement
2008-01-11 15:45 ` Aneesh Kumar K.V
2008-01-14 14:05   ` Valerie Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox