Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbbHGMDh (ORCPT ); Fri, 7 Aug 2015 08:03:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47941 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753179AbbHGMDX (ORCPT ); Fri, 7 Aug 2015 08:03:23 -0400 Date: Fri, 7 Aug 2015 14:01:14 +0200 From: Oleg Nesterov To: Jason Low Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Frederic Weisbecker , "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: <20150807120114.GB16897@redhat.com> References: <1438734584.2927.15.camel@j-VirtualBox> <20150806141820.GA8258@redhat.com> <1438885310.4833.82.camel@j-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438885310.4833.82.camel@j-VirtualBox> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1361 Lines: 35 On 08/06, Jason Low wrote: > > On Thu, 2015-08-06 at 16:18 +0200, Oleg Nesterov wrote: > > > + /* > > > + * Check for the special case process timers. > > > + */ > > > + check_cpu_itimer(tsk, &sig->it[CPUCLOCK_PROF], &prof_expires, ptime, > > > + SIGPROF); > > > + check_cpu_itimer(tsk, &sig->it[CPUCLOCK_VIRT], &virt_expires, utime, > > > + SIGVTALRM); > > > + > > > > Not sure I understand this part... looks wrong actually, please note > > that RLIMIT_CPU block above may need to update prof_expires _after_ > > check_cpu_itimer(), or I am totally confused. > > This change isn't critical to the patch, so we can delete this from the > patch. Though from my understanding, the purpose of prof_expires is to > collect the earliest prof expire time for when we update > "sig->cputime_expires.prof_exp". So I think it wouldn't matter which > order prof_expire gets updated (as long as check_timers_list() is called > first, since prof_expires gets directly assigned there). Yes, I missed that check_cpu_itimer() checks "it->expires < *expires" before it updates *expires. Thanks for correcting me! Oleg. -- 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/