From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Kyeongdon Kim <kyeongdon.kim@lge.com>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend
Date: Fri, 27 Nov 2015 11:05:10 +0900 [thread overview]
Message-ID: <20151127020510.GA4220@swordfish> (raw)
In-Reply-To: <1448430673-10766-3-git-send-email-minchan@kernel.org>
Hello,
Minchan Kim wrote:
[..]
> +static struct zcomp_strm *zcomp_strm_alloc(struct zcomp *comp, gfp_t flags)
> {
> + zstrm = zcomp_strm_alloc(comp, GFP_NOIO|__GFP_NORETRY|
> + __GFP_NOWARN|__GFP_NOMEMALLOC);
and it seems that after 3/3 (v2) we also lost GFP_ZERO for private
allocation. kzalloc->kmalloc, and no explicit __GFP_ZERO for __vmalloc().
> - ret = kzalloc(LZ4_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> - __GFP_NOWARN|__GFP_NOMEMALLOC);
> + ret = kmalloc(LZ4_MEM_COMPRESS, flags);
^^^ here
> if (!ret)
> - ret = __vmalloc(LZ4_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> - __GFP_NOWARN|__GFP_NOMEMALLOC|
> - __GFP_ZERO,
> - PAGE_KERNEL);
> + ret = __vmalloc(LZ4_MEM_COMPRESS, flags, PAGE_KERNEL);
^^^ here
> - ret = kzalloc(LZO1X_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> - __GFP_NOWARN|__GFP_NOMEMALLOC);
> +
> + ret = kmalloc(LZO1X_MEM_COMPRESS, flags);
^^^ ditto
> if (!ret)
> - ret = __vmalloc(LZO1X_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> - __GFP_NOWARN|__GFP_NOMEMALLOC|
> - __GFP_ZERO,
> - PAGE_KERNEL);
> + ret = __vmalloc(LZO1X_MEM_COMPRESS, flags, PAGE_KERNEL);
^^^ ditto
so lz*_create() should look like
---
static void *lzo_create(gfp_t flags)
{
void *ret;
ret = kzalloc(LZO1X_MEM_COMPRESS, flags);
if (!ret)
ret = __vmalloc(LZO1X_MEM_COMPRESS,
flags | __GFP_ZERO | __GFP_HIGHMEM,
PAGE_KERNEL);
return ret;
}
---
I have a patchset with my nitpicks addressed and fix-ups for missing gfps.
Do you mind me to send it out?
-ss
next prev parent reply other threads:[~2015-11-27 2:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 5:51 [PATCH v2 1/3] zram/zcomp: use GFP_NOIO to allocate streams Minchan Kim
2015-11-25 5:51 ` [PATCH v2 2/3] zram: try vmalloc() after kmalloc() Minchan Kim
2015-11-25 5:51 ` [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend Minchan Kim
2015-11-25 12:46 ` Sergey Senozhatsky
2015-11-25 13:50 ` Minchan Kim
2015-11-25 15:04 ` Sergey Senozhatsky
2015-11-25 15:20 ` Minchan Kim
2015-11-26 7:39 ` Sergey Senozhatsky
2015-11-25 12:50 ` [PATCH 1/2] " Sergey Senozhatsky
2015-11-25 12:50 ` [PATCH 2/2] zram: try vmalloc() after kmalloc() Sergey Senozhatsky
2015-11-27 2:05 ` Sergey Senozhatsky [this message]
2015-11-27 2:19 ` [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend Sergey Senozhatsky
2015-11-27 2:30 ` Sergey Senozhatsky
[not found] ` <CAEwNFnC5edvy2a+-gXP0xU1QPGKrEhQhr_cR6KGL2teskwZPpg@mail.gmail.com>
2015-11-27 3:31 ` Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2015-11-26 7:24 Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151127020510.GA4220@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kyeongdon.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox