Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751867AbbHEJhp (ORCPT ); Wed, 5 Aug 2015 05:37:45 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:45273 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbbHEJhm (ORCPT ); Wed, 5 Aug 2015 05:37:42 -0400 Date: Wed, 5 Aug 2015 11:37:19 +0200 From: Peter Zijlstra To: Jason Low Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Frederic Weisbecker , Oleg Nesterov , "Paul E. McKenney" , Davidlohr Bueso , Mike Galbraith , terry.rudd@hp.com, Rik van Riel , Waiman Long , Scott J Norton Subject: Re: [RFC PATCH] timer: Improve itimers scalability Message-ID: <20150805093719.GV25159@twins.programming.kicks-ass.net> References: <1438734584.2927.15.camel@j-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438734584.2927.15.camel@j-VirtualBox> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 29 On Tue, Aug 04, 2015 at 05:29:44PM -0700, Jason Low wrote: > @@ -1137,6 +1148,13 @@ static inline int fastpath_timer_check(struct task_struct *tsk) > if (READ_ONCE(sig->cputimer.running)) { Maybe make that: if (READ_ONCE(sig->cputimer.running) && !READ_ONCE(sig->cputimer.is_checking_timer)) { > struct task_cputime group_sample; > > + /* > + * If another thread in the group is already checking > + * for the thread group cputimer, then we will skip that. > + */ > + if (READ_ONCE(sig->cputimer.is_checking_timer)) > + return 0; > + > sample_cputime_atomic(&group_sample, &sig->cputimer.cputime_atomic); > > if (task_cputime_expired(&group_sample, &sig->cputime_expires)) -- 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/