All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>,
	viro@ZenIV.linux.org.uk, akpm@linux-foundation.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH, RFC] prune back iprune_sem
Date: Tue, 15 Feb 2011 15:53:52 +0100	[thread overview]
Message-ID: <20110215145352.GA9199@lst.de> (raw)
In-Reply-To: <20110215144905.GF17313@quack.suse.cz>

On Tue, Feb 15, 2011 at 03:49:05PM +0100, Jan Kara wrote:
> inodes, that are just being freed by prune_icache(). Thus we can trigger
> WARN_ON() in evict_inodes():
>                 if (inode->i_state & (I_NEW | I_FREEING | I_WILL_FREE)) {
>                         WARN_ON(1);
>                         continue;
>                 }

That WARN_ON didn't exist when I submitted the patch three month ago,
but yes, it should be removed now.

>   Otherwise, the change looks safe to me. BTW, the iprune_sem is now used
> only so that evict_inodes() can wait for prune_icache() to finish so maybe
> we could have something simpler for that?

I can't think of anything simple.  The proper way to do it would be to
make the inode lru per-sb just like the dentry lru list.  That way we
always hold a reference to the superblock while pruning inodes form the
LRU and all associated issues go away.  Dave had a patch for this as
part of implementing a

	for_each_sb {
		prune dcache;
		prune icache;
		prune fs-specific cache;
	}

algorithm.  I still think it's the right way to go, but it fell under
the table and I really need a way to fix the lockdep warning / rare
deadlock the current scheme causes for XFS.


      reply	other threads:[~2011-02-15 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 18:45 [PATCH, RFC] prune back iprune_sem Christoph Hellwig
2010-11-04 23:32 ` Jan Kara
2011-02-15 10:29 ` Christoph Hellwig
2011-02-15 14:49   ` Jan Kara
2011-02-15 14:53     ` Christoph Hellwig [this message]

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=20110215145352.GA9199@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.