[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140904071553.GA26930@quack.suse.cz>
Date: Thu, 4 Sep 2014 09:15:53 +0200
From: Jan Kara <jack@...e.cz>
To: Theodore Ts'o <tytso@....edu>
Cc: Jan Kara <jack@...e.cz>, Zheng Liu <gnehzuil.liu@...il.com>,
linux-ext4@...r.kernel.org,
Andreas Dilger <adilger.kernel@...ger.ca>,
Zheng Liu <wenqing.lz@...bao.com>
Subject: Re: [PATCH v3 4/6] ext4: change lru to round-robin in extent status
tree shrinker
On Wed 03-09-14 18:38:05, Ted Tso wrote:
> On Thu, Sep 04, 2014 at 12:14:02AM +0200, Jan Kara wrote:
> > > I didn't think we were allowed to reschedule or sleep while in
> > > shrinker context?
> > I believe we are allowed to sleep in the shrinker if appropriate gfp
> > flags are set (__GFP_WAIT) and we enter extent cache shrinker only if
> > __GFP_FS is set which guarantees __GFP_WAIT.
>
> I must be missing something. How is this guaranteed?
>
> I can see how we can determine what gfp_mask was used in the
> allocation which triggered the shrinker callback, by checking
> shrink->gfp_mask, but I don't see anything that guarantees that the
> extent cache shrinker is only entered if __GFP_FS is set.
>
> I guess we could add something like:
>
> if ((shrink->gfp_mask & __GFP_WAIT) == 0)
> return 0;
>
> to the beginning of ext4_es_scan(), but we're not doing that at the
> moment.
Ah, sorry. I was mistaken and thought we do check for __GFP_FS in
ext4_es_scan() but we don't and we don't need to. But thinking about it
again - if we're going to always scan at most nr_to_scan cache entries,
there's probably no need to reduce s_es_lock latency by playing with
spinlock_contended(), right?
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists