From: Patrick Marlier <patrick.marlier@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 0/3] rculist: Fix list_entry_rcu to read ptr with, rcu_dereference_raw
Date: Tue, 24 Mar 2015 11:31:33 +0100 [thread overview]
Message-ID: <55113D05.9070401@gmail.com> (raw)
Hi Paul and Josh,
While running some benchmarks with rcu, I noticed that rculist had a
performance issue compared to the non-rcu list.
Having a closer look at the rlulist, I found that there is a bad usage
of rcu_dereference_raw in list_entry_rcu().
Indeed, "typeof (*ptr) *__ptr = ptr;" reads ptr and
"rcu_dereference_raw(__ptr)" forces read on the stack variable __ptr.
However, ptr should be read with rcu_dereference_raw not the __ptr.
This was introduced some years ago with commit 67bdbffd (2010-02-25).
I am proposing to revert this part of the patch but probably this can be
fixed differently.
Fixing this showed 2 problems in the usage of list_entry_rcu.
Since it touches other parts of kernel, I guess it requires ack from
other maintainers.
Thanks.
PS: I will Cc the others maintainers when somebody confirms the problem.
Signed-off-by: Patrick Marlier <patrick.marlier@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Arnd Bergmann <arnd@arndb.de>
reply other threads:[~2015-03-24 10:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=55113D05.9070401@gmail.com \
--to=patrick.marlier@gmail.com \
--cc=arnd@arndb.de \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.