linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jinjiang Tu <tujinjiang@huawei.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Amir Goldstein <amir73il@gmail.com>,
	miklos@szeredi.hu, akpm@linux-foundation.org, vbabka@suse.cz,
	jannh@google.com, linux-mm@kvack.org,
	linux-unionfs@vger.kernel.org, wangkefeng.wang@huawei.com,
	sunnanyong@huawei.com, yi.zhang@huawei.com,
	Liam Howlett <liam.howlett@oracle.com>
Subject: Re: [PATCH -next] ovl: respect underlying filesystem's get_unmapped_area()
Date: Fri, 6 Dec 2024 13:52:16 +0000	[thread overview]
Message-ID: <Z1MBkH_PeZto3qkC@casper.infradead.org> (raw)
In-Reply-To: <518c881b-8ba0-df0e-16bf-00694c59f5a7@huawei.com>

On Fri, Dec 06, 2024 at 11:35:20AM +0800, Jinjiang Tu wrote:
> When usespace calls mmap syscall, the call trace is as follows:
> 
> do_mmap
>   __get_unmapped_area
>   mmap_region
>     mmap_file
>       ovl_mmap
> 
> __get_unmapped_area() gets the address to mmap at, the file here is an overlayfs file.
> Since ovl_file_operations doesn't defines get_unmapped_area callback, __get_unmapped_area()
> fallbacks to mm_get_unmapped_area_vmflags(), and it doesn't return an address aligned to
> large folio size.

It doesn't need to.  large folios can be mapped at any alignment.
The get_unmapped_area overrides are just for efficiency (ie be
able to use PMD mappings when we happen to get a PMD-sized folio).


  reply	other threads:[~2024-12-06 13:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 14:30 Jinjiang Tu
2024-12-05 15:04 ` Lorenzo Stoakes
2024-12-05 15:12   ` Amir Goldstein
2024-12-05 15:24     ` Lorenzo Stoakes
2024-12-06  3:35       ` Jinjiang Tu
2024-12-06 13:52         ` Matthew Wilcox [this message]
2024-12-10 17:36       ` Jann Horn
2024-12-06  3:35   ` Jinjiang Tu
2024-12-06  9:25     ` Lorenzo Stoakes
2024-12-06 10:45       ` Kefeng Wang
2024-12-06 11:53         ` Lorenzo Stoakes
2024-12-10  7:09           ` Kefeng Wang
2024-12-06 12:58         ` Amir Goldstein
2024-12-10  7:19           ` Kefeng Wang
2024-12-11  9:43             ` Amir Goldstein
2024-12-11 15:01               ` Kefeng Wang
2024-12-13  1:51                 ` Jinjiang Tu
2024-12-13  4:25               ` Matthew Wilcox
2024-12-13  7:49                 ` Kefeng Wang
2024-12-13 14:00                   ` Matthew Wilcox
2024-12-14  7:58                     ` Kefeng Wang
2024-12-05 21:21 ` kernel test robot
2024-12-06 13:58 ` Matthew Wilcox
2024-12-09  6:43   ` Jinjiang Tu
2024-12-09 13:33     ` Matthew Wilcox
2024-12-10  7:13       ` Jinjiang Tu
2024-12-10 17:58         ` Matthew Wilcox
2024-12-11  2:21           ` Zhang Yi

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=Z1MBkH_PeZto3qkC@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=amir73il@gmail.com \
    --cc=jannh@google.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=miklos@szeredi.hu \
    --cc=sunnanyong@huawei.com \
    --cc=tujinjiang@huawei.com \
    --cc=vbabka@suse.cz \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yi.zhang@huawei.com \
    /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