[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191023173524.GM17610@dhcp22.suse.cz>
Date: Wed, 23 Oct 2019 19:35:24 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Mike Christie <mchristi@...hat.com>
Cc: Dave Chinner <david@...morbit.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
martin@...ackup.org, Damien.LeMoal@....com
Subject: Re: [PATCH] Add prctl support for controlling PF_MEMALLOC V2
On Wed 23-10-19 12:27:29, Mike Christie wrote:
> On 10/23/2019 02:11 AM, Michal Hocko wrote:
> > On Wed 23-10-19 07:43:44, Dave Chinner wrote:
> >> On Tue, Oct 22, 2019 at 06:33:10PM +0200, Michal Hocko wrote:
> >
> > Thanks for more clarifiation regarding PF_LESS_THROTTLE.
> >
> > [...]
> >>> PF_IO_FLUSHER would mean that the user
> >>> context is a part of the IO path and therefore there are certain reclaim
> >>> recursion restrictions.
> >>
> >> If PF_IO_FLUSHER just maps to PF_LESS_THROTTLE|PF_MEMALLOC_NOIO,
> >> then I'm not sure we need a new definition. Maybe that's the ptrace
> >> flag name, but in the kernel we don't need a PF_IO_FLUSHER process
> >> flag...
> >
> > Yes, the internal implementation would do something like that. I was
> > more interested in the user space visible API at this stage. Something
> > generic enough because exporting MEMALLOC flags is just a bad idea IMHO
> > (especially PF_MEMALLOC).
>
> Do you mean we would do something like:
>
> prctl()
> ....
> case PF_SET_IO_FLUSHER:
> current->flags |= PF_MEMALLOC_NOIO;
> ....
yes, along with PF_LESS_THROTTLE.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists