| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 08/12] superblock: introduce per-sb cache shrinker infrastructure |
| From: | Al Viro <viro@xxxxxxxxxxxxxxxxxx> |
| Date: | Sat, 4 Jun 2011 15:24:48 +0100 |
| Cc: | Dave Chinner <david@xxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, xfs@xxxxxxxxxxx |
| In-reply-to: | <20110604141940.GW11521@xxxxxxxxxxxxxxxxxx> |
| References: | <1306998067-27659-1-git-send-email-david@xxxxxxxxxxxxx> <1306998067-27659-9-git-send-email-david@xxxxxxxxxxxxx> <20110604004231.GV11521@xxxxxxxxxxxxxxxxxx> <20110604015212.GD561@dastard> <20110604140848.GA20404@xxxxxxxxxxxxx> <20110604141940.GW11521@xxxxxxxxxxxxxxxxxx> |
| Sender: | Al Viro <viro@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Sat, Jun 04, 2011 at 03:19:40PM +0100, Al Viro wrote: > > The iprune_sem removal is fine as soon as you have a per-sb shrinker > > for the inodes which keeps an active reference on the superblock until > > all the inodes are evicted. > > I really don't like that. Stuff keeping active refs, worse yet doing that > asynchronously... Shrinkers should *not* do that. Just grab a passive > ref (i.e. bump s_count), try grab s_umount (shared) and if that thing still > has ->s_root while we hold s_umount, go ahead. Unregister either at the > end of generic_shutdown_super() or from deactivate_locked_super(), between > the calls of ->kill_sb() and put_filesystem(). PS: shrinkers should not acquire active refs; more specifically, they should not _drop_ active refs, lest they end up dropping the last active one and trigger unregistering a shrinker for superblock in question. From inside of ->shrink(), with shrinker_rwsem held by caller. Deadlock... |
| Previous by Date: | Re: [PATCH 08/12] superblock: introduce per-sb cache shrinker infrastructure, Al Viro |
|---|---|
| Next by Date: | Randolf recommends this site, laura.murphy@xxxxxxxxx |
| Previous by Thread: | Re: [PATCH 08/12] superblock: introduce per-sb cache shrinker infrastructure, Al Viro |
| Next by Thread: | [PATCH 12/12] xfs: make use of new shrinker callout for the inode cache, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |