From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: Re: [PATCH] vfs: Avoid IPI storm due to bh LRU invalidation Date: Mon, 06 Feb 2012 16:51:41 +0100 Message-ID: <4F2FF70D.5020603@suse.de> References: <1328536531-19034-1-git-send-email-jack@suse.cz> <4F2FF4EC.1000104@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jan Kara , linux-fsdevel@vger.kernel.org, LKML , Andrew Morton , Al Viro , Christoph Hellwig , Gilad Ben-Yossef To: "Srivatsa S. Bhat" Return-path: In-Reply-To: <4F2FF4EC.1000104@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 02/06/2012 04:42 PM, Srivatsa S. Bhat wrote: > On 02/06/2012 07:25 PM, Jan Kara wrote: >=20 >> When discovery of lots of disks happen in parallel, we call >> invalidate_bh_lrus() once for each disk from partitioning code resul= ting in a >> storm of IPIs and causing a softlockup detection to fire (it takes s= everal >> *minutes* for a machine to execute all the invalidate_bh_lrus() call= s). >> >> Fix the issue by allowing only single invalidation to run using a mu= tex and let >> waiters for mutex figure out whether someone invalidated LRUs for th= em while >> they were waiting. >> >> Signed-off-by: Jan Kara >> --- >> fs/buffer.c | 23 ++++++++++++++++++++++- >> 1 files changed, 22 insertions(+), 1 deletions(-) >> >> I feel this is slightly hacky approach but it works. If someone ha= s better >> idea, please speak up. >> >=20 >=20 > Something related that you might be interested in: > https://lkml.org/lkml/2012/2/5/109 >=20 > (This is part of Gilad's patchset that tries to reduce cross-CPU IPI > interference.) >=20 Yes, but this is only part of the equation. When booting a machine with lots of disks chances are that each CPU _will_ have LRU BHs attached to it (due to partitions table reading). However, these LRU BHs have nothing to do with the device in question. So we wouldn't even need to send IPIs here. Sadly we seem to lack the facilities to figure that out (I'm not an expert in that area to tell for sure :-). So the best we can hope for is to serialise the IPIs to not overload system with tons of IPIs. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)