From: Christoph Lameter <cl@gentwo.org>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt
Date: Thu, 17 Jul 2014 08:50:54 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.11.1407170848490.27584@gentwo.org> (raw)
In-Reply-To: <1405552141-8506-1-git-send-email-bobby.prani@gmail.com>
On Wed, 16 Jul 2014, Pranith Kumar wrote:
> +You can also do the following to convert the datap offset to an address
> +
> + struct data *p = this_cpu_ptr(&datap);
> +
> +but, passing of pointers calculated via this_cpu_ptr to other cpus is
> +unusual and should be avoided.
> +
> +Such remote accesses to per CPU data are not guaranteed to be atomic
> +anymore. You will have to use atomic_t and rely on the standard atomic
> +operations for these remote accesses to be atomic.
The use of atomic_t implies a remote write operation to a percpu area.
atomic_t needs to be avoided. If data needs to be modified from multiple
cpus then it usually does not belong into a percpu area.
next prev parent reply other threads:[~2014-07-17 13:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 23:09 Pranith Kumar
2014-07-17 13:50 ` Christoph Lameter [this message]
[not found] ` <53C7D93B.4090006@gmail.com>
2014-07-17 14:39 ` Christoph Lameter
2014-07-17 14:48 ` Pranith Kumar
2014-07-17 14:55 ` Christoph Lameter
2014-07-17 15:03 ` Pranith Kumar
2014-07-17 15:26 ` Christoph Lameter
2014-07-17 23:44 ` Pranith Kumar
2014-07-17 15:19 ` Christoph Lameter
2014-07-17 23:44 ` Pranith Kumar
2014-07-18 14:23 ` Christoph Lameter
[not found] ` <53C709DD.5060506@gmail.com>
2014-07-17 13:52 ` Christoph Lameter
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.11.1407170848490.27584@gentwo.org \
--to=cl@gentwo.org \
--cc=bobby.prani@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@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
all inboxes | Powered by JetHome®