* Unusual code in mballoc.c.
@ 2008-09-28 1:56 Rusty Russell
2008-09-28 4:01 ` Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2008-09-28 1:56 UTC (permalink / raw)
To: linux-ext4; +Cc: Alex Tomas, Mike Travis
Hi all,
A grep lead me to fs/ext4/mballoc.c:
Line 2551:
for (i = 0; i < nr_cpu_ids; i++) {
This is more normally "for_each_possible_cpu(i)".
Line 4097:
ac->ac_lg = &sbi->s_locality_groups[get_cpu()];
put_cpu();
This is presumably someone suppressing a warning. It should be:
ac->ac_lg = &sbi->s_locality_groups[raw_smp_processor_id()];
Thanks,
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Unusual code in mballoc.c.
2008-09-28 1:56 Unusual code in mballoc.c Rusty Russell
@ 2008-09-28 4:01 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2008-09-28 4:01 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-ext4, Alex Tomas, Mike Travis
Rusty Russell wrote:
> Hi all,
>
> A grep lead me to fs/ext4/mballoc.c:
>
> Line 2551:
> for (i = 0; i < nr_cpu_ids; i++) {
>
> This is more normally "for_each_possible_cpu(i)".
>
> Line 4097:
> ac->ac_lg = &sbi->s_locality_groups[get_cpu()];
> put_cpu();
>
> This is presumably someone suppressing a warning. It should be:
> ac->ac_lg = &sbi->s_locality_groups[raw_smp_processor_id()];
>
> Thanks,
> Rusty.
Hi Rusty - I sent a patch for this a while back...
http://repo.or.cz/w/ext4-patch-queue.git?a=blob;f=ext4-use-percpu-data-for-lg_prealloc_list;h=8ddebb7f6054f70e34b142d7ae6f314d6629aac7;hb=HEAD
Thanks,
-Eric
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-28 4:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 1:56 Unusual code in mballoc.c Rusty Russell
2008-09-28 4:01 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).