From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <cl@linux.com>
Cc: "ksummit-discuss@lists.linuxfoundation.org"
<ksummit-discuss@lists.linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jens Axboe <axboe@fb.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Shaohua Li <shli@fb.com>
Subject: Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences
Date: Mon, 13 Jul 2015 11:57:57 +0200 [thread overview]
Message-ID: <20150713095757.GW19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.11.1507101224440.21165@east.gentwo.org>
On Fri, Jul 10, 2015 at 12:26:21PM -0500, Christoph Lameter wrote:
> On Thu, 9 Jul 2015, Chris Mason wrote:
>
> > I think the topic is really interesting and we'll be able to get numbers
> > from production workloads to help justify and compare different
> > approaches.
>
> Ok that would be important. I also think that the approach may be used
> in kernel to reduce the overhead of CONFIG_PREEMPT and also to implement
> fast versions of this_cpu_ops for non x86 architectures and maybe even
There is nothing stopping people from trying this in-kernel, in fact
that would be lots easier as we do not have to commit to any one
specific ABI for that.
Also, I don't think we need a schedule check for the in-kernel usage,
pure interrupt should be good enough, nobody should (want to) call
schedule() while inside such a critical section, which leaves us with
involuntary preemption, and those are purely interrupt driven.
Now the 'problem' is finding these special regions fast, the easy
solution is the same as the one proposed for userspace, one big section.
That way the interrupt only has to check if the IP is inside this
section which is minimal effort.
The down side is that all percpu ops would then end up being full
function calls. Which on some archs is indeed faster than disabling
interrupts, but not by much I'm afraid.
> optimize the x86 variants if interrupts also can detect critical sections
> and restart at defined points.
I really don't see how we can beat %GS prefixes with any such scheme.
next prev parent reply other threads:[~2015-07-13 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 18:32 Andy Lutomirski
2015-07-09 19:09 ` Chris Mason
2015-07-10 17:26 ` Christoph Lameter
2015-07-13 9:57 ` Peter Zijlstra [this message]
2015-07-13 14:01 ` Christoph Lameter
2015-07-14 20:00 ` Andy Lutomirski
2015-07-14 21:15 ` Christoph Lameter
2015-07-22 14:22 ` Lai Jiangshan
2015-07-22 14:34 ` Lai Jiangshan
2015-07-22 14:03 ` Lai Jiangshan
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=20150713095757.GW19282@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=axboe@fb.com \
--cc=cl@linux.com \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=shli@fb.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox