Re: [PATCH 2.6.15-rc2] Fxi hardcoded cpu=0 in workqueue for per_cpu_ptr() calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Collins <[email protected]> wrote:
> Tracked this down on an Ultra Enterprise 3000. It's a 6-way machine. Odd
> thing about this machine (and it's good for finding bugs like this) is
> that the CPU id's are not 0 based. For instance, on my machine the CPU's
> are 6/7/10/11/14/15.

Good catch.
 
> I changed the 0's to any_online_cpu(cpu_online_mask), which cpumask.h
> claims is "First cpu in mask". So this fits the same usage.

any_online_cpu(cpu_online_mask) is a bit of a tautology.  How about
first_cpu(cpu_online_mask)? In fact, I'd prefer a new macro altogether
which you can then define to zero on UP.

This patch raises an interesting question actually.  What happens
when the CPU that's designated to run single-threaded wq's gets
removed?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux