Re: [PATCH] fs/aio: Stop allocating aio rings from HIGHMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
> Suggested-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
> ---
>  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@xxxxxxxxx>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux