From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751463AbbFYHnn (ORCPT ); Thu, 25 Jun 2015 03:43:43 -0400 Received: from casper.infradead.org ([85.118.1.10]:42913 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097AbbFYHnj (ORCPT ); Thu, 25 Jun 2015 03:43:39 -0400 Date: Thu, 25 Jun 2015 09:43:33 +0200 From: Peter Zijlstra To: Dave Hansen Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com, Thomas Gleixner Subject: Re: [RFC][PATCH] sched: might_sleep(): do rate-limiting before sanity checks Message-ID: <20150625074333.GU3644@twins.programming.kicks-ass.net> References: <20150625000354.255E7263@viggo.jf.intel.com> <558B7746.9010605@sr71.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558B7746.9010605@sr71.net> 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 On Wed, Jun 24, 2015 at 08:36:38PM -0700, Dave Hansen wrote: > On 06/24/2015 05:03 PM, Dave Hansen wrote: > > In any case, we ratelimit might_sleep() checks anyway. But, we > > do the ratelimiting *after* we check the other conditions for > > might_sleep() including the (costly) irqs_disabled() call. > > Thinking about this a bit more, this patch is wrong. > > This only does a _check_ once per jiffy instead of just one warning per > jiffy, which is totally bogus. > > I would be interested, though, if anybody has any ideas about speeding > up the irqs_disabled() checking. Thomas has something up his sleeve..