From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759588AbbA3BnZ (ORCPT ); Thu, 29 Jan 2015 20:43:25 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:64485 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754788AbbA3BnX (ORCPT ); Thu, 29 Jan 2015 20:43:23 -0500 From: "Rafael J. Wysocki" To: Linus Torvalds Cc: Ingo Molnar , Peter Hurley , Davidlohr Bueso , Peter Zijlstra , Bruno =?ISO-8859-1?Q?Pr=E9mont?= , Linux Kernel Mailing List , Thomas Gleixner , Ilya Dryomov , Mike Galbraith , Oleg Nesterov Subject: Re: Linux 3.19-rc5 Date: Fri, 30 Jan 2015 03:06:11 +0100 Message-ID: <1456360.Y3S5fhtEMe@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, January 29, 2015 05:25:07 PM Linus Torvalds wrote: > On Thu, Jan 29, 2015 at 5:12 PM, Linus Torvalds > wrote: > > > > The WARN() was already changed to a WARN_ONCE(). > > Oh, but I notice that the "__set_current_state(TASK_RUNNING) ends up > always happening. > > So I think the right fix is to: > > - warn once like we do > > - but *not* do that __set_current_state() which was always total crap anyway > > Why do I say "total crap"? Because of two independent issues: > > (a) it actually changes behavior for a debug vs non-debug kernel, > which is a really bad idea to begin with > > (b) it's really wrong. The whole "nested sleep" case was never a > major bug to begin with, just a possible inefficiency where constant > nested sleeps would possibly make the outer sleep not sleep. But that > "could possibly make" case was the unlikely case, and the debug patch > made it happen *all* the time by explicitly setting things running. > > So I think the proper patch is the attached. I applied the patch and compiled the kernel with CONFIG_DEBUG_ATOMIC_SLEEP set again. The warning is back, so the DEBUG_ATOMIC_SLEEP thing appears to be working (and I don't really care about the freaking warning anyway), but the pccardd load issue is gone, so the patch fixes the problem for me. Thanks! Rafael