Re: [PATCH] zram/zcomp: use GFP_NOIO to allocate streams

Sergey Senozhatsky
2015-11-24T04:40:41Z

On (11/24/15 13:13), Minchan Kim wrote:
> First of all, Thanks for the summary and proposal.

sure :)

> I think GFP_NOIO critical part(ie, your lockdep fix patch) should
> go to -stable so it should stand alone.
>
> About vmalloc, I like that. Just problem was gfp and we can
> pass it from upper layer so I believe it makes code looks clean
> and solve differnt gfp problem.

doing vmalloc() after kmalloc in general looks ok, but the thing is that
kmalloc()->vmalloc() fallback does not mean that stream allocation will
end up being successful, because right after ->private we need to allocate
->buffer via __get_free_pages() and that thing can fail. so trying harder
in comp->backend->create() is just half of what we need.

but the question is -- do we have a really big reason to fallback in
->private allocation? we are quite prepared to handle that allocation
failure and I tend to think that in low memory condition it's probably
better to avoid stealing pages for additional streams; one stream is
just enough, if we are lucky to have more than one stream by that time
-- then fine.

> Please look at my patchset I just sent.

I'll take a look once I receive them (not in my inbox yet).

-ss