Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-12 Thread David Rientjes
On Tue, 12 Aug 2014, Pranith Kumar wrote: > It looks more like an inconsistency. These are the only three places > which use ACCESS_ONCE() for jiffies. Also, in doc/memory-barriers.txt, > it explicitly states that ACCESS_ONCE(jiffies) is not necessary. I > grepped for this usage after reading

Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-12 Thread Pranith Kumar
On Tue, Aug 12, 2014 at 1:55 AM, Peter Zijlstra wrote: > On Mon, Aug 11, 2014 at 06:51:41PM -0400, Pranith Kumar wrote: >> jiffies is declared as a volatile variable. Therefore it is not neccessary to >> use ACCESS_ONCE() while reading it. > > It also doesn't hurt and it documents intent, so I'm

Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-12 Thread Pranith Kumar
On Tue, Aug 12, 2014 at 1:55 AM, Peter Zijlstra pet...@infradead.org wrote: On Mon, Aug 11, 2014 at 06:51:41PM -0400, Pranith Kumar wrote: jiffies is declared as a volatile variable. Therefore it is not neccessary to use ACCESS_ONCE() while reading it. It also doesn't hurt and it documents

Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-12 Thread David Rientjes
On Tue, 12 Aug 2014, Pranith Kumar wrote: It looks more like an inconsistency. These are the only three places which use ACCESS_ONCE() for jiffies. Also, in doc/memory-barriers.txt, it explicitly states that ACCESS_ONCE(jiffies) is not necessary. I grepped for this usage after reading that

Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-11 Thread Peter Zijlstra
On Mon, Aug 11, 2014 at 06:51:41PM -0400, Pranith Kumar wrote: > jiffies is declared as a volatile variable. Therefore it is not neccessary to > use ACCESS_ONCE() while reading it. It also doesn't hurt and it documents intent, so I'm inclined to keep it. pgp8tFMX2calj.pgp Description: PGP

[PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-11 Thread Pranith Kumar
jiffies is declared as a volatile variable. Therefore it is not neccessary to use ACCESS_ONCE() while reading it. Signed-off-by: Pranith Kumar --- kernel/sched/core.c | 2 +- kernel/sched/proc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c

[PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-11 Thread Pranith Kumar
jiffies is declared as a volatile variable. Therefore it is not neccessary to use ACCESS_ONCE() while reading it. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- kernel/sched/core.c | 2 +- kernel/sched/proc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies

2014-08-11 Thread Peter Zijlstra
On Mon, Aug 11, 2014 at 06:51:41PM -0400, Pranith Kumar wrote: jiffies is declared as a volatile variable. Therefore it is not neccessary to use ACCESS_ONCE() while reading it. It also doesn't hurt and it documents intent, so I'm inclined to keep it. pgp8tFMX2calj.pgp Description: PGP