From: Matthew Wilcox <willy@infradead.org>
To: Yin Fengwei <fengwei.yin@intel.com>
Cc: david@redhat.com, linux-mm@kvack.org, dave.hansen@intel.com,
tim.c.chen@intel.com, ying.huang@intel.com
Subject: Re: [RFC PATCH v2 3/5] rmap: add page_add_file_rmap_range()
Date: Wed, 1 Feb 2023 17:32:59 +0000 [thread overview]
Message-ID: <Y9qiS/IxZOMx62t6@casper.infradead.org> (raw)
In-Reply-To: <20230201081737.2330141-4-fengwei.yin@intel.com>
On Wed, Feb 01, 2023 at 04:17:35PM +0800, Yin Fengwei wrote:
> /**
> - * page_add_file_rmap - add pte mapping to a file page
> - * @page: the page to add the mapping to
> + * page_add_file_rmap_range - add pte mapping to a sub page range of a folio
> + * @folio: The filio to add the mapping to
> + * @start: The first sub page index in folio
> + * @nr_pages: The number of sub pages from the first page
> * @vma: the vm area in which the mapping is added
> * @compound: charge the page as compound or small page
> *
> + * The sub page range of folio is defined by
> + * [first_sub_page, first_sub_page + nr_pages)
Lose the "sub" from all of this. That's legacy thinking; pages are
pages and folios are folios. "subpages" was from when we were trying
to use the word "page" for both "the allocation" and "the PAGE_SIZE
range of bytes".
> + *
> * The caller needs to hold the pte lock.
> */
> -void page_add_file_rmap(struct page *page, struct vm_area_struct *vma,
> - bool compound)
> +void page_add_file_rmap_range(struct folio *folio, unsigned long start,
> + unsigned int nr_pages, struct vm_area_struct *vma,
> + bool compound)
I think this function needs to be called folio_add_file_rmap()
I'd like to lose the 'compound' parameter, and base it on nr_pages ==
folio_nr_pages(), but that may be a step far just now.
next prev parent reply other threads:[~2023-02-01 17:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 8:17 [RFC PATCH v2 0/5] folio based filemap_map_pages() Yin Fengwei
2023-02-01 8:17 ` [RFC PATCH v2 1/5] mm: Enable fault around for shared file page fault Yin Fengwei
2023-02-01 14:34 ` Kirill A. Shutemov
2023-02-02 1:54 ` Yin, Fengwei
2023-02-01 8:17 ` [RFC PATCH v2 2/5] filemap: add function filemap_map_folio_range() Yin Fengwei
2023-02-01 8:17 ` [RFC PATCH v2 3/5] rmap: add page_add_file_rmap_range() Yin Fengwei
2023-02-01 17:32 ` Matthew Wilcox [this message]
2023-02-02 2:00 ` Yin, Fengwei
2023-02-01 8:17 ` [RFC PATCH v2 4/5] mm: add do_set_pte_range() Yin Fengwei
2023-02-01 9:09 ` David Hildenbrand
2023-02-01 10:04 ` Yin, Fengwei
2023-02-01 17:38 ` Matthew Wilcox
2023-02-01 21:59 ` Matthew Wilcox
2023-02-02 3:18 ` Yin, Fengwei
2023-02-03 8:54 ` Yin Fengwei
2023-02-01 8:17 ` [RFC PATCH v2 5/5] filemap: batched update mm counter,rmap when map file folio Yin Fengwei
2023-02-01 15:50 ` Matthew Wilcox
2023-02-02 3:31 ` Yin, Fengwei
2023-02-03 13:15 ` Yin, Fengwei
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=Y9qiS/IxZOMx62t6@casper.infradead.org \
--to=willy@infradead.org \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=fengwei.yin@intel.com \
--cc=linux-mm@kvack.org \
--cc=tim.c.chen@intel.com \
--cc=ying.huang@intel.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;
as well as URLs for NNTP newsgroup(s).