Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645625

Re: Virtually Mapped Stacks: Do not disable interrupts

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: Virtually Mapped Stacks: Do not disable interrupts
Date 2017-05-19 16:10 +0200
Message-ID <tIQLo-3eE-9@gated-at.bofh.it> (permalink)
References <tI9wJ-4XI-7@gated-at.bofh.it> <tIINP-5PI-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 18 May 2017, Andy Lutomirski wrote:

> On Wed, May 17, 2017 at 8:58 AM, Christoph Lameter <cl@linux.com> wrote:
> > The reason to disable interrupts seems to be to avoid switching
> > to a different processor while handling per cpu data using
> > individual loads and stores. If we use per cpu RMV primitives
> > we will not have to disable interrupts.
>
> I like this, except that those primitives can be quite expensive, I
> think, and they're being called in a loop.  What if you first did a
> this_cpu_read() to see if the value in the cache slot might be useful
> before doing the heavyweight exchange?

These operations are not expensive because they are unlocked operations
(in constrast to the usuual "lock cmpxchg") and do not
require coherency to be guaranteed between processors. That is why they
were made available because they are so much cheaper.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Virtually Mapped Stacks: Do not disable interrupts Christoph Lameter <cl@linux.com> - 2017-05-17 18:00 +0200
  Re: Virtually Mapped Stacks: Do not disable interrupts Andy Lutomirski <luto@amacapital.net> - 2017-05-19 07:40 +0200
    Re: Virtually Mapped Stacks: Do not disable interrupts Christoph Lameter <cl@linux.com> - 2017-05-19 16:10 +0200

csiph-web