[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200107143058.GU3929@twin.jikos.cz>
Date: Tue, 7 Jan 2020 15:30:59 +0100
From: David Sterba <dsterba@...e.cz>
To: Eduard Shishkin <edward6@...ux.ibm.com>
Cc: dsterba@...e.cz, Mikhail Zaslonko <zaslonko@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Richard Purdie <rpurdie@...ys.net>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Ilya Leoshkevich <iii@...ux.ibm.com>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists