Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763624AbYHDUwc (ORCPT ); Mon, 4 Aug 2008 16:52:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756094AbYHDUwX (ORCPT ); Mon, 4 Aug 2008 16:52:23 -0400 Received: from nf-out-0910.google.com ([64.233.182.191]:65062 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755698AbYHDUwV (ORCPT ); Mon, 4 Aug 2008 16:52:21 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type; b=q76xr2OEbDGcVFTmWYfKmsPNRALEzf4YE0xaqakbd5Niu2DtiznxCXtPrSeb3JkkvP W3gLVAKfQdJ6iUcNJO/ctmZbQGBTtYg/pa9qIvAhiUg9IJatLgB9F3jIzdnvPRf+h9jK /zJzOFxv4r8QVNcq93Pq32FzdBgGokeU6DZZs= Message-ID: <520f0cf10808041352h78bd4319x1802f018aeffe6dc@mail.gmail.com> Date: Mon, 4 Aug 2008 22:52:19 +0200 From: "John Kacur" To: LKML , rt-users Subject: [PATCH RFC] pm_qos_requirement might sleep Cc: "Steven Rostedt" , "Ingo Molnar" , "Thomas Gleixner" , "Peter Zijlstra" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_35101_28729097.1217883139712" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2800 Lines: 60 ------=_Part_35101_28729097.1217883139712 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Even after applying some fixes posted by Chirag and Peter Z, I'm still getting some messages in my log like this BUG: sleeping function called from invalid context swapper(0) at kernel/rtmutex.c:743 in_atomic():1 [00000001], irqs_disabled():1 Pid: 0, comm: swapper Tainted: G W 2.6.26.1-rt1.jk #2 Call Trace: [] __might_sleep+0x12d/0x132 [] __rt_spin_lock+0x34/0x7d [] rt_spin_lock+0xe/0x10 [] pm_qos_requirement+0x1f/0x3c [] menu_select+0x7b/0x9c [] ? default_idle+0x0/0x5a [] ? default_idle+0x0/0x5a [] cpuidle_idle_call+0x68/0xd8 [] ? cpuidle_idle_call+0x0/0xd8 [] ? default_idle+0x0/0x5a [] cpu_idle+0xb2/0x12d [] start_secondary+0x186/0x18b --------------------------- | preempt count: 00000001 ] | 1-level deep critical section nesting: ---------------------------------------- .. [] .... cpu_idle+0x11b/0x12d .....[] .. ( <= start_secondary+0x186/0x18b) The following simple patch makes the messages disappear - however, there may be a better more fine grained solution, but the problem is also that all the functions are designed to use the same lock. ------=_Part_35101_28729097.1217883139712 Content-Type: text/x-patch; name=pm_qos_requirement.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fjhk3o5e0 Content-Disposition: attachment; filename=pm_qos_requirement.patch cG1fcW9zX3JlcXVpcmVtZW50LWZpeApTaWduZWQtb2ZmLWJ5OiBKb2huIEthY3VyIDxqa2FjdXIg YXQgZ21haWwgZG90IGNvbT4KCkluZGV4OiBsaW51eC0yLjYuMjYuMS1qay1ydDEva2VybmVsL3Bt X3Fvc19wYXJhbXMuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC0yLjYuMjYuMS1qay1ydDEub3JpZy9r ZXJuZWwvcG1fcW9zX3BhcmFtcy5jCisrKyBsaW51eC0yLjYuMjYuMS1qay1ydDEva2VybmVsL3Bt X3Fvc19wYXJhbXMuYwpAQCAtMTEwLDcgKzExMCw3IEBAIHN0YXRpYyBzdHJ1Y3QgcG1fcW9zX29i amVjdCAqcG1fcW9zX2FycmEKIAkmbmV0d29ya190aHJvdWdocHV0X3BtX3FvcwogfTsKIAotc3Rh dGljIERFRklORV9TUElOTE9DSyhwbV9xb3NfbG9jayk7CitzdGF0aWMgREVGSU5FX1JBV19TUElO TE9DSyhwbV9xb3NfbG9jayk7CiAKIHN0YXRpYyBzc2l6ZV90IHBtX3Fvc19wb3dlcl93cml0ZShz dHJ1Y3QgZmlsZSAqZmlscCwgY29uc3QgY2hhciBfX3VzZXIgKmJ1ZiwKIAkJc2l6ZV90IGNvdW50 LCBsb2ZmX3QgKmZfcG9zKTsK ------=_Part_35101_28729097.1217883139712-- -- 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/