lkml.org 
[lkml]   [2020]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/6] btrfs: Use larger zlib buffer for s390 hardware compression
On Tue, Jan 07, 2020 at 01:18:06AM +0100, Eduard Shishkin wrote:
> >> @@ -61,7 +64,17 @@ struct list_head *zlib_alloc_workspace(unsigned int level)
> >> zlib_inflate_workspacesize());
> >> workspace->strm.workspace = kvmalloc(workspacesize, GFP_KERNEL);
> >> workspace->level = level;
> >> - workspace->buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
> >> + workspace->buf = NULL;
> >> + if (zlib_deflate_dfltcc_enabled()) {
> >> + workspace->buf = kmalloc(ZLIB_DFLTCC_BUF_SIZE,
> >> + __GFP_NOMEMALLOC | __GFP_NORETRY |
> >> + __GFP_NOWARN | GFP_NOIO);
> > Why do you use this wild GFP flag combination? I can understand NOWARN,
> > but why the others?
>
> This addresses the following complaint about order 2 allocation with
> GFP_KERNEL:
> https://lkml.org/lkml/2019/11/26/417
>
> Below a fallback to a single page is implemented, as it was suggested.
> So, the initial (more costly) allocation should be made with minimal
> aggression
> to allow the allocator fail. Otherwise, that fallback simply doesn't
> make sense.
> Hence, such a combination.

I see, please add a comment explaining that.

\
 
 \ /
  Last update: 2020-01-07 15:33    [W:0.081 / U:11.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site