lkml.org 
[lkml]   [2015]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] zram: try vmalloc() after kmalloc()
On Mon, Nov 23, 2015 at 03:40:29PM -0800, Andrew Morton wrote:
> On Tue, 24 Nov 2015 08:28:57 +0900 Minchan Kim <minchan@kernel.org> wrote:
>
> > > What's the reasoning behind the modification to the gfp flags?
> > >
> > > It clears __GFP_FS, __GFP_IO and even __GFP_WAIT. I suspect the latter
> > > two (at least) can be retained. And given that vmalloc() uses
> >
> > This function is used in swapout and fs write path so we couldn't use
> > those flags.
>
> We can use __GFP_RECLAIM (used to be __GFP_WAIT). That permits the
> allocation to wait for in-flight IO to complete and to reclaim clean
> pagecache.

Generally, you're right but in case of zram, it would be unfortunate.

It would be void *most of time* because it is called in reclaim context
and reclaim path bails out to avoid recursion of direct reclaim
by PF_MEMALLOC without trying reclaim.
However, the reason I said *most of time* is we has another context
the funcion could be called.

"disksize_store"->zcomp_create

In the place, we should make sure the successful allocation to work
zram at least so that path should use another gfp.
I will work for that.

Thanks, Andrew,


>

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2015-11-24 02:01    [W:0.054 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site