Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbbHZRxh (ORCPT ); Wed, 26 Aug 2015 13:53:37 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:35370 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbbHZRxg (ORCPT ); Wed, 26 Aug 2015 13:53:36 -0400 MIME-Version: 1.0 In-Reply-To: <1440559068-29680-4-git-send-email-jason.low2@hp.com> References: <1440559068-29680-1-git-send-email-jason.low2@hp.com> <1440559068-29680-4-git-send-email-jason.low2@hp.com> Date: Wed, 26 Aug 2015 10:53:35 -0700 X-Google-Sender-Auth: w-MkGUJPDfTMySQRo3xJm1e3N7A Message-ID: Subject: Re: [PATCH 3/3] timer: Reduce unnecessary sighand lock contention From: Linus Torvalds To: Jason Low Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Oleg Nesterov , "Paul E. McKenney" , Linux Kernel Mailing List , Frederic Weisbecker , Davidlohr Bueso , Steven Rostedt , Andrew Morton , Terry Rudd , Rik van Riel , Scott J Norton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 21 On Tue, Aug 25, 2015 at 8:17 PM, Jason Low 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/