Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbbBRPFe (ORCPT ); Wed, 18 Feb 2015 10:05:34 -0500 Received: from mail-we0-f179.google.com ([74.125.82.179]:40871 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbbBRPFc (ORCPT ); Wed, 18 Feb 2015 10:05:32 -0500 Message-ID: <1424271928.6903.3.camel@gmail.com> Subject: [patch-3.18.7-rt1]sunrpc: make svc_xprt_do_enqueue() use get_cpu_light() From: Mike Galbraith To: Sebastian Andrzej Siewior Cc: linux-rt-users , LKML , Thomas Gleixner , rostedt@goodmis.org, John Kacur Date: Wed, 18 Feb 2015 16:05:28 +0100 In-Reply-To: <20150216111822.GA21649@linutronix.de> References: <20150216111822.GA21649@linutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2854 Lines: 63 [ 37.667792] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 37.720307] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 [ 37.720307] in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd [ 37.720318] Preemption disabled at:[] svc_xprt_received+0x4b/0xc0 [sunrpc] [ 37.720320] CPU: 6 PID: 3194 Comm: rpc.nfsd Not tainted 3.18.7-rt1 #9 [ 37.720320] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.404 11/06/2014 [ 37.720321] ffff880409630000 ffff8800d9a33c78 ffffffff815bdeb5 0000000000000002 [ 37.720322] 0000000000000000 ffff8800d9a33c98 ffffffff81073c86 ffff880408dd6008 [ 37.720322] ffff880408dd6000 ffff8800d9a33cb8 ffffffff815c3d84 ffff88040b3ac000 [ 37.720323] Call Trace: [ 37.720326] [] dump_stack+0x4f/0x9e [ 37.720328] [] __might_sleep+0xe6/0x150 [ 37.720329] [] rt_spin_lock+0x24/0x50 [ 37.720335] [] svc_xprt_do_enqueue+0x80/0x230 [sunrpc] [ 37.720340] [] svc_xprt_received+0x4b/0xc0 [sunrpc] [ 37.720345] [] svc_add_new_perm_xprt+0x6d/0x80 [sunrpc] [ 37.720349] [] svc_addsock+0x143/0x200 [sunrpc] [ 37.720351] [] ? __getnstimeofday64+0x37/0xd0 [ 37.720352] [] ? getnstimeofday64+0xe/0x30 [ 37.720353] [] ? do_gettimeofday+0x1a/0x50 [ 37.720356] [] write_ports+0x28c/0x340 [nfsd] [ 37.720358] [] ? debug_smp_processor_id+0x17/0x20 [ 37.720361] [] ? might_fault+0x47/0x50 [ 37.720363] [] ? write_versions+0x320/0x320 [nfsd] [ 37.720365] [] nfsctl_transaction_write+0x4c/0x80 [nfsd] [ 37.720366] [] vfs_write+0xb3/0x1d0 [ 37.720368] [] ? release_sock+0x152/0x1a0 [ 37.720369] [] SyS_write+0x49/0xb0 [ 37.720371] [] system_call_fastpath+0x16/0x1b Signed-off-by: Mike Galbraith --- net/sunrpc/svc_xprt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -357,7 +357,7 @@ static void svc_xprt_do_enqueue(struct s return; } - cpu = get_cpu(); + cpu = get_cpu_light(); pool = svc_pool_for_cpu(xprt->xpt_server, cpu); spin_lock_bh(&pool->sp_lock); @@ -390,7 +390,7 @@ static void svc_xprt_do_enqueue(struct s } spin_unlock_bh(&pool->sp_lock); - put_cpu(); + put_cpu_light(); } /* -- 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/