From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eliezer Tamir Subject: Re: [PATCH 6/7] sched: Clean up preempt_enable_no_resched() abuse Date: Tue, 26 Nov 2013 09:15:38 +0200 Message-ID: <52944A9A.6090906@linux.intel.com> References: <20131120160450.072555619@infradead.org> <20131120162736.691879744@infradead.org> <528CF94E.8020300@linux.intel.com> <20131121101018.GX10022@twins.programming.kicks-ass.net> <528E09F9.9030501@linux.intel.com> <20131121133936.GF10022@twins.programming.kicks-ass.net> <528F0000.7000505@linux.intel.com> <20131122113044.GL10022@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com ([134.134.136.20]:30137 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754322Ab3KZHQL (ORCPT ); Tue, 26 Nov 2013 02:16:11 -0500 In-Reply-To: <20131122113044.GL10022@twins.programming.kicks-ass.net> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Peter Zijlstra Cc: Arjan van de Ven , lenb@kernel.org, rjw@rjwysocki.net, Eliezer Tamir , David Miller , rui.zhang@intel.com, jacob.jun.pan@linux.intel.com, Mike Galbraith , Ingo Molnar , hpa@zytor.com, Thomas Gleixner , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org On 22/11/2013 13:30, Peter Zijlstra wrote: > On Fri, Nov 22, 2013 at 08:56:00AM +0200, Eliezer Tamir wrote: >> On 21/11/2013 15:39, Peter Zijlstra wrote: >>> On Thu, Nov 21, 2013 at 03:26:17PM +0200, Eliezer Tamir wrote: > > Please use local_clock(), yes its slightly more expensive, but I doubt > you can actually measure the effects on sane hardware. If we limit the discussion to sane hardware, I should mention that on current Intel CPUs TSC is guaranteed to be monotonic for anything up to 8 sockets. Even on slightly older HS TSC skew is very small and should not be an issue for this use case. So: Modern sane HW does not have this issue. The people that do busy polling typically pin tasks to cores anyway. You need cap_net_admin to use this setting. There is no real damage if the issue happens. This is fast-low-latency-path so we are very sensitive to adding even a small cost. Linus really didn't like adding to the cost of poll/select when busy polling is not being used. Having said that, since we need to fix the timeout issue you pointed out, we will test the use of local_clock() and see if it matters or not. Again, I have no objection to changing the use of preempt_enable_no_resched() to a plain preempt_enable(). Cheers, Eliezer