[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180625145733.GP28965@dhcp22.suse.cz>
Date: Mon, 25 Jun 2018 16:57:33 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: jing xia <jing.xia.mail@...il.com>,
Mike Snitzer <snitzer@...hat.com>, agk@...hat.com,
dm-devel@...hat.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: dm bufio: Reduce dm_bufio_lock contention
On Mon 25-06-18 10:42:30, Mikulas Patocka wrote:
>
>
> On Mon, 25 Jun 2018, Michal Hocko wrote:
>
> > > And the throttling in dm-bufio prevents kswapd from making forward
> > > progress, causing this situation...
> >
> > Which is what we have PF_THROTTLE_LESS for. Geez, do we have to go in
> > circles like that? Are you even listening?
> >
> > [...]
> >
> > > And so what do you want to do to prevent block drivers from sleeping?
> >
> > use the existing means we have.
> > --
> > Michal Hocko
> > SUSE Labs
>
> So - do you want this patch?
>
> There is no behavior difference between changing the allocator (so that it
> implies PF_THROTTLE_LESS for block drivers) and chaning all the block
> drivers to explicitly set PF_THROTTLE_LESS.
As long as you can reliably detect those users. And using gfp_mask is
about the worst way to achieve that because users tend to be creative
when it comes to using gfp mask. PF_THROTTLE_LESS in general is a
way to tell the allocator that _you_ are the one to help the reclaim by
cleaning data.
> But if you insist that the allocator can't be changed, we have to repeat
> the same code over and over again in the block drivers.
I am not familiar with the patched code but mempool change at least
makes sense (bvec_alloc seems to fallback to mempool which then makes
sense as well). If others in md/ do the same thing
I would just use current_restore_flags rather than open code it.
Thanks!
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists