linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, <linux-aio@kvack.org>,
	<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] fs/aio: Stop allocating aio rings from HIGHMEM
Date: Tue, 13 Jun 2023 13:12:00 -0700	[thread overview]
Message-ID: <6488cd9030687_1ad89929456@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20230609145937.17610-1-fmdefrancesco@gmail.com>

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@zeniv.linux.org.uk>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.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@intel.com>

  reply	other threads:[~2023-06-13 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 14:59 [PATCH] fs/aio: Stop allocating aio rings from HIGHMEM Fabio M. De Francesco
2023-06-13 20:12 ` Ira Weiny [this message]
2023-06-14  8:04 ` Christian Brauner

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=6488cd9030687_1ad89929456@iweiny-mobl.notmuch \
    --to=ira.weiny@intel.com \
    --cc=bcrl@kvack.org \
    --cc=brauner@kernel.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).