[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhHMCAk3VQVE_wqojF48ozB52igHGGdJQQVV+rrOCFTf-RqdQ@mail.gmail.com>
Date: Tue, 12 Aug 2014 10:42:45 -0400
From: Pranith Kumar <bobby.prani@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>,
"open list:SCHEDULER" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: Remove ACCESS_ONCE() for jiffies
On Tue, Aug 12, 2014 at 1:55 AM, Peter Zijlstra <peterz@...radead.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 intent, so I'm inclined to keep
> it.
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 document just to make sure
and found these three uses.
But yes, there is no harm being done by using ACCESS_ONCE().
--
Pranith
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists