ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: "ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences
Date: Thu, 9 Jul 2015 11:32:45 -0700	[thread overview]
Message-ID: <CALCETrVPe7ijOHY5BXLPCG5VBxadeZoUDLOBMX+jEFnJynJ8FA@mail.gmail.com> (raw)

Several people have suggested that Linux should provide users with a
lightweight mechanism that allows light-weight fancy per-cpu
operations.  This could be used to implement free lists or counters
without any barriers or atomic operations, for example.

There are at least three approaches floating around.  Paul Turner
proposed a single block of userspace code that aborts if it's
preempted -- within that block, percpu variables can be used safely.
Mathieu Desnoyers proposed a more complex variant.  I proposed a much
simpler approach of just offering percpu gs bases on x86, allowing
cmpxchg (as opposed to lock cmpxchg) to access percpu variables.

None of these should be hard to implement, but it would be nice to
hash out whether the kernel should support such a mechanism at all
and, if so, what it would look like.

Jon Corbet unsurprisingly has a nice writeup here:

http://lwn.net/SubscriberLink/650333/f23d07040a58cd46/

--Andy

             reply	other threads:[~2015-07-09 18:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 18:32 Andy Lutomirski [this message]
2015-07-09 19:09 ` Chris Mason
2015-07-10 17:26   ` Christoph Lameter
2015-07-13  9:57     ` Peter Zijlstra
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=CALCETrVPe7ijOHY5BXLPCG5VBxadeZoUDLOBMX+jEFnJynJ8FA@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=peterz@infradead.org \
    /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