Re: [PATCH RFC ticketlock] Auto-queued ticketlock
From: Steven Rostedt
Date: Tue Jun 11 2013 - 13:02:03 EST
On Tue, 2013-06-11 at 09:36 -0700, Paul E. McKenney wrote:
> > I am a bit concern about the size of the head queue table itself.
> > RHEL6, for example, had defined CONFIG_NR_CPUS to be 4096 which mean
> > a table size of 256. Maybe it is better to dynamically allocate the
> > table at init time depending on the actual number of CPUs in the
> > system.
>
> But if your kernel is built for 4096 CPUs, the 32*256=8192 bytes of memory
> is way down in the noise. Systems that care about that small an amount
> of memory probably have a small enough number of CPUs that they can just
> turn off queueing at build time using CONFIG_TICKET_LOCK_QUEUED=n, right?
If this turns out to work for large machines, that means that distros
will enable it, and distros tend to up the NR_CPUS, which is defined at
compile time and is set regardless of if you are running with 2 CPUs or
a 1000 CPUs.
For now it's fine to use NR_CPUS, but I always try to avoid it. Working
in the ARM and POWER environment you are use to lots of kernels compiled
specifically for the target. But in the x86 world, it is basically one
kernel for all environments, where NR_CPUS does make a big difference.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/