From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbcGNLwK (ORCPT ); Thu, 14 Jul 2016 07:52:10 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36364 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbcGNLwI (ORCPT ); Thu, 14 Jul 2016 07:52:08 -0400 Subject: Re: [RFC PATCH] dcache: give a chance to yield in shrink_dentry_list To: Biscuit Ninja , linux-kernel@vger.kernel.org References: <1468494776.3175.5.camel@cinelli.bikeshed.internal> From: Nikolay Borisov Cc: Alexander Viro Message-ID: <57877CE2.60605@kyup.com> Date: Thu, 14 Jul 2016 14:52:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1468494776.3175.5.camel@cinelli.bikeshed.internal> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/14/2016 02:12 PM, Biscuit Ninja wrote: >> A softlockup in shrink_dentry_list when called from shrink_dcache_sb >> was observed on a very busy server. It's possible that the list >> passed to shrink_dentry_list is so big that it takes a while to >> dispose of all entries. Adding a simple cond_resched would give >> the cpu a chance to do some other useful work and no trip the >> softlockup watchdog. > > Hello Nikolay, > > I'm interested in your proposed patch because I believe I've come across > the same issue a handful of times, typically: [CCing Al Viro to ping re. the following patch: https://patchwork.kernel.org/patch/8642031/ ] I haven't looked at the 3.13 source but the patch is trivial enough so that you can apply it. Just go ahead and test :) Too bad I didn't receive any feedback and have frankly forgotten it. > > WARNING: CPU: 0 PID: 22717 > at /build/buildd/linux-lts-trusty-3.13.0/fs/dcache.c:362 d_shrink_del > +0x79/0x90() > Modules linked in: pcnet32 mii vmwgfx ttm drm psmouse lp i2c_piix4 ppdev > parport_pc vmw_vmci shpchp serio_raw mac_hid vmw_balloon parport floppy > mptspi mptscsih mptbase e1000 vmw_pvscsi vmxnet3 > CPU: 0 PID: 22717 Comm: sh Not tainted 3.13.0-32-generic > #57~precise1-Ubuntu > Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop > Reference Platform, BIOS 6.00 10/22/2013 > 000000000000016a ffff88000616bbe8 ffffffff81752c9e 0000000000000007 > 0000000000000000 ffff88000616bc28 ffffffff8106af7c ffff88000616bc08 > ffff880037f54480 ffff880037f54480 ffff880037f54500 ffff880037f544d8 > Call Trace: > [] dump_stack+0x46/0x58 > [] warn_slowpath_common+0x8c/0xc0 > [] warn_slowpath_null+0x1a/0x20 > [] d_shrink_del+0x79/0x90 > [] shrink_dentry_list+0x62/0xe0 > [] shrink_dcache_parent+0x28/0x70 > [] proc_flush_task_mnt.isra.15+0x77/0x170 > [] proc_flush_task+0x56/0x70 > [] release_task+0x33/0x130 > [] wait_task_zombie+0x4cf/0x5f0 > [] wait_consider_task.part.8+0x10b/0x180 > [] wait_consider_task+0x65/0x70 > [] do_wait+0x101/0x260 > [] SyS_wait4+0xa3/0x100 > [] ? task_stopped_code+0x50/0x50 > [] tracesys+0xe1/0xe6 > ---[ end trace e2a4a7d8b698f0ea ]--- > BUG: soft lockup - CPU#0 stuck for 22s! [sh:22717] > Modules linked in: pcnet32 mii vmwgfx ttm drm psmouse lp i2c_piix4 ppdev > parport_pc vmw_vmci shpchp serio_raw mac_hid vmw_balloon parport floppy > mptspi mptscsih mptbase e1000 vmw_pvscsi vmxnet3 > CPU: 0 PID: 22717 Comm: sh Tainted: G W 3.13.0-32-generic > #57~precise1-Ubuntu > Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop > Reference Platform, BIOS 6.00 10/22/2013 > task: ffff88001ef717f0 ti: ffff88000616a000 task.ti: ffff88000616a000 > RIP: 0010:[] [] _raw_spin_lock > +0x1c/0x50 > RSP: 0018:ffff88000616bc58 EFLAGS: 00000246 > > > This is under Ubuntu 12.04.5 with kernel 3.13.0-32-generic. >