[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6488cd9030687_1ad89929456@iweiny-mobl.notmuch>
Date: Tue, 13 Jun 2023 13:12:00 -0700
From: Ira Weiny <ira.weiny@...el.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Benjamin LaHaise <bcrl@...ck.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, <linux-aio@...ck.org>,
<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Ira Weiny <ira.weiny@...el.com>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] fs/aio: Stop allocating aio rings from HIGHMEM
Fabio M. De Francesco wrote:
> There is no need to allocate aio rings from HIGHMEM because of very
> little memory needed here.
>
> Therefore, use GFP_USER flag in find_or_create_page() and get rid of
> kmap*() mappings.
>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> Cc: Ira Weiny <ira.weiny@...el.com>
> Suggested-by: Matthew Wilcox <willy@...radead.org>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> ---
> fs/aio.c | 26 +++++++++-----------------
> 1 file changed, 9 insertions(+), 17 deletions(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index b0b17bd098bb..77e33619de40 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
[snip]
> @@ -1250,10 +1244,9 @@ static long aio_read_events_ring(struct kioctx *ctx,
> avail = min(avail, nr - ret);
> avail = min_t(long, avail, AIO_EVENTS_PER_PAGE - pos);
>
> - ev = kmap(page);
> + ev = page_address(page);
NIT: This might be cleaner to remove the temp variable;
ev = page_address(ctx->ring_pages[pos / AIO_EVENTS_PER_PAGE];
But generally LGTM.
Reviewed-by: Ira Weiny <ira.weiny@...el.com>
Powered by blists - more mailing lists