[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFycqGaitE4Q7yRWmkiR5zU6_Axy1+Tv6HKnorkec+J6tg@mail.gmail.com>
Date: Wed, 26 Aug 2015 10:53:35 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jason Low <jason.low2@...com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Davidlohr Bueso <dave@...olabs.net>,
Steven Rostedt <rostedt@...dmis.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Terry Rudd <terry.rudd@...com>, Rik van Riel <riel@...hat.com>,
Scott J Norton <scott.norton@...com>
Subject: Re: [PATCH 3/3] timer: Reduce unnecessary sighand lock contention
On Tue, Aug 25, 2015 at 8:17 PM, Jason Low <jason.low2@...com> wrote:
>
> This patch addresses this by having the thread_group_cputimer structure
> maintain a boolean to signify when a thread in the group is already
> checking for process wide timers, and adds extra logic in the fastpath
> to check the boolean.
It is not at all obvious why the unlocked read of that variable is
safe, and why there is no race with another thread just about to end
its check_process_timers().
I can well imagine that this is all perfectly safe and fine, but I'd
really like to see that comment about _why_ that's the case, and why a
completely unlocked access without even memory barriers is fine.
Linus
--
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