mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Dave Jones <davej@redhat.com>,
	linux-kernel@vger.kernel.org, mingo@kernel.org, tj@kernel.org,
	grygorii.strashko@ti.com
Subject: Re: How do I increment a per-CPU variable without warning?
Date: Wed, 16 Apr 2014 10:12:16 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1404161008390.9945@gentwo.org> (raw)
In-Reply-To: <20140416052147.GK26782@laptop.programming.kicks-ass.net>

On Wed, 16 Apr 2014, Peter Zijlstra wrote:

> You really want to disable preemption around there. The proper old way
> would've been get_cpu_var()/put_cpu_var().

get_cpu_var and put_cpu_var is still the correct way of doing things if
you need to access multiple per cpu variables.

The problem that I want to solve is the varied use of
__get_cpu_var for address calculations, per cpu variable assignment,
structure copying and per cpu variable access. The this_cpu ops can avoid
address calculations using segment prefixes. Plus the changes clarify what
is actuallly going on.



  parent reply	other threads:[~2014-04-16 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 22:17 Paul E. McKenney
2014-04-15 22:29 ` Dave Jones
2014-04-15 22:47   ` Paul E. McKenney
2014-04-16  3:54     ` Paul E. McKenney
2014-04-16  5:21       ` Peter Zijlstra
2014-04-16 13:03         ` Paul E. McKenney
2014-04-16 15:12         ` Christoph Lameter [this message]
2014-04-16  5:19 ` Peter Zijlstra
2014-04-16 15:08 ` Christoph Lameter
2014-04-16 16:06   ` Paul E. McKenney
2014-04-16 17:12     ` Paul E. McKenney
2014-04-16 18:29       ` Christoph Lameter
2014-04-16 18:47         ` Paul E. McKenney
2014-04-17 17:36           ` Christoph Lameter
2014-04-17 17:46             ` Paul E. McKenney
2014-04-17 17:53               ` Christoph Lameter
2014-04-17 18:21                 ` Paul E. McKenney

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=alpine.DEB.2.10.1404161008390.9945@gentwo.org \
    --to=cl@linux.com \
    --cc=davej@redhat.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tj@kernel.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

all inboxes | Powered by JetHome®