linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	Gilad Ben-Yossef <gilad@benyossef.com>
Subject: Re: [PATCH] vfs: Avoid IPI storm due to bh LRU invalidation
Date: Mon, 06 Feb 2012 16:51:41 +0100	[thread overview]
Message-ID: <4F2FF70D.5020603@suse.de> (raw)
In-Reply-To: <4F2FF4EC.1000104@linux.vnet.ibm.com>

On 02/06/2012 04:42 PM, Srivatsa S. Bhat wrote:
> On 02/06/2012 07:25 PM, Jan Kara wrote:
> 
>> When discovery of lots of disks happen in parallel, we call
>> invalidate_bh_lrus() once for each disk from partitioning code resulting in a
>> storm of IPIs and causing a softlockup detection to fire (it takes several
>> *minutes* for a machine to execute all the invalidate_bh_lrus() calls).
>>
>> Fix the issue by allowing only single invalidation to run using a mutex and let
>> waiters for mutex figure out whether someone invalidated LRUs for them while
>> they were waiting.
>>
>> Signed-off-by: Jan Kara <jack@suse.cz>
>> ---
>>  fs/buffer.c |   23 ++++++++++++++++++++++-
>>  1 files changed, 22 insertions(+), 1 deletions(-)
>>
>>   I feel this is slightly hacky approach but it works. If someone has better
>> idea, please speak up.
>>
> 
> 
> Something related that you might be interested in:
> https://lkml.org/lkml/2012/2/5/109
> 
> (This is part of Gilad's patchset that tries to reduce cross-CPU IPI
> interference.)
> 
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
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2012-02-06 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 13:55 [PATCH] vfs: Avoid IPI storm due to bh LRU invalidation Jan Kara
2012-02-06 15:42 ` Srivatsa S. Bhat
2012-02-06 15:51   ` Hannes Reinecke [this message]
2012-02-06 16:47   ` Jan Kara
2012-02-06 21:17     ` Andrew Morton
2012-02-06 22:25       ` Jan Kara
2012-02-07 16:25         ` Gilad Ben-Yossef
2012-02-07 18:29           ` Jan Kara
2012-02-08  7:09             ` Gilad Ben-Yossef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F2FF70D.5020603@suse.de \
    --to=hare@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=gilad@benyossef.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).