Re: [PATCH 1/3] lglock: remove online variants of lock

From: Rusty Russell
Date: Tue May 08 2012 - 02:13:42 EST


On Tue, 8 May 2012 05:50:44 +0100, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Tue, May 08, 2012 at 01:29:45PM +0930, Rusty Russell wrote:
> > Optimizing the slow paths adds a lot of complexity. If you need to
> > grab every lock often, you have other problems.
>
> Applied, but I'm not too happy about the situation with vfsmount_lock ;-/
> On kernels built for a lot of possible CPUs the loss of ..._online()
> versions will get painful.

My original motivation was to get rid of that cpumask_t (and replace it
with a cpumask_var_t). A simple enough patch, but I couldn't bring
myself to leave that complex logic in place without clear justification.

> OTOH, we can always put the map + single
> spinlock + single notifier into lglock.c and reproduce the old logics.
> I'll do a patch along those lines and put it on a separate branch;
> then we'll be able to test and compare.

I'll be interested in the results: virtual systems are classic for
wanting large # of CPUs which aren't actually online, so we might
actually care.

I'd also like to get rid of the cpu_possible_map altogether, and just
have NR_CPUS/nr_cpu_ids, since last I checked no arch really wants
sparse numbers.

Cheers,
Rusty.
--
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/