From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Nick Piggin <npiggin@kernel.dk>,
linux-kernel <linux-kernel@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andi Kleen <ak@linux.intel.com>,
linux-fsdevel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arjan van de Ven <arjan.van.de.ven@intel.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
mc@linux.vnet.ibm.com
Subject: Re: [PATCH] cpumask: fix lg_lock/br_lock.
Date: Thu, 01 Mar 2012 15:26:26 +0530 [thread overview]
Message-ID: <4F4F47CA.2060900@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120301094529.GA366@elte.hu>
On 03/01/2012 03:15 PM, Ingo Molnar wrote:
>
> * Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>
>> We wanted to avoid doing for_each_possible_cpu() to avoid the
>> unnecessary performance hit. [...]
>
> That was done at the cost of making the code rather complex.
>
Sadly, yes..
> The thing is, *ANY* cpu-mask loop is an utter slowpath, so the
> "performance hit" is an overstatement. There's already dozens of
> of for_each_possible_cpu() loops in the kernel, and it's a
> perfectly acceptable solution in such cases.
>
> I suspect it does not matter much now as the code appears to be
> correct, but in general we want to opt for simpler designs for
> rare and fragile codepaths.
>
Ok, makes sense. And now looking back at the amount of complexity
we built into this just to avoid the for_each_possible_cpu() loop,
I wonder why we went to such lengths at all! (considering what you
said above about any cpu-mask loop..)
Regards,
Srivatsa S. Bhat
next prev parent reply other threads:[~2012-03-01 9:56 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 23:22 [PATCH] cpumask: fix lg_lock/br_lock Rusty Russell
2012-02-27 23:53 ` Andrew Morton
2012-02-27 23:53 ` Andrew Morton
2012-02-28 8:43 ` Ingo Molnar
2012-02-28 11:25 ` Andi Kleen
2012-02-28 12:51 ` Ingo Molnar
2012-02-28 21:27 ` Andrew Morton
2012-02-29 5:44 ` Srivatsa S. Bhat
2012-02-29 9:17 ` Ingo Molnar
2012-02-29 11:12 ` Srivatsa S. Bhat
2012-03-01 7:38 ` Ingo Molnar
2012-03-01 9:15 ` Srivatsa S. Bhat
2012-03-01 9:45 ` Ingo Molnar
2012-03-01 9:56 ` Srivatsa S. Bhat [this message]
2012-03-01 8:12 ` Srivatsa S. Bhat
2012-03-01 8:24 ` Srivatsa S. Bhat
2012-03-01 8:12 ` Srivatsa S. Bhat
2012-03-01 8:15 ` [PATCH 1/3] CPU hotplug: Fix issues with callback registration Srivatsa S. Bhat
2012-03-01 8:27 ` Srivatsa S. Bhat
2012-03-01 8:15 ` Srivatsa S. Bhat
2012-03-01 8:16 ` [PATCH 2/3] CPU hotplug, arch/powerpc: Fix CPU hotplug " Srivatsa S. Bhat
2012-03-01 8:28 ` Srivatsa S. Bhat
2012-03-01 8:16 ` Srivatsa S. Bhat
2012-03-01 8:18 ` [PATCH 3/3] CPU hotplug, arch/sparc: " Srivatsa S. Bhat
2012-03-01 8:30 ` Srivatsa S. Bhat
2012-03-01 8:18 ` Srivatsa S. Bhat
2012-02-29 8:29 ` [PATCH] cpumask: fix lg_lock/br_lock Ingo Molnar
2012-02-29 8:58 ` Peter Zijlstra
2012-02-29 9:32 ` Ingo Molnar
2012-02-28 11:24 ` Andi Kleen
2012-03-05 7:02 ` Rusty Russell
2012-03-05 7:03 ` [PATCH 1/3] lglock: remove online variants of lock Rusty Russell
2012-04-20 11:12 ` Nick Piggin
2012-03-05 7:04 ` [PATCH 2/3] brlocks/lglocks: API cleanups Rusty Russell
2012-03-05 7:05 ` [PATCH 3/3] brlocks/lglocks: turn into functions Rusty Russell
2012-04-20 11:21 ` Nick Piggin
2012-05-07 3:39 ` Rusty Russell
2012-05-07 5:46 ` Al Viro
2012-05-08 3:59 ` [PATCH 1/3] lglock: remove online variants of lock Rusty Russell
2012-05-08 4:50 ` Al Viro
2012-05-08 6:12 ` Rusty Russell
2012-05-08 4:02 ` [PATCH 2/3] brlocks/lglocks: API cleanups Rusty Russell
2012-05-08 4:02 ` [PATCH 3/3] brlocks/lglocks: turn into functions Rusty Russell
2012-05-09 7:35 ` Nick Piggin
2012-05-09 7:35 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F4F47CA.2060900@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=arjan.van.de.ven@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mc@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=npiggin@kernel.dk \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.