From: Matthew Wilcox <willy@infradead.org>
To: John Hubbard <jhubbard@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>,
Jane Chu <jane.chu@oracle.com>,
linux-mm@kvack.org
Subject: Re: updated documentation: Splitting pinned folios
Date: Thu, 14 Mar 2024 17:45:58 +0000 [thread overview]
Message-ID: <ZfM31mgv1XYCeSbT@casper.infradead.org> (raw)
In-Reply-To: <a88d174f-3a49-48d7-b91a-04a7ae972a21@nvidia.com>
On Wed, Mar 13, 2024 at 07:46:54PM -0700, John Hubbard wrote:
> /*
> * This function splits a huge page into normal pages. @page can point to any
s/huge page/large folio/ and s/normal/smaller/ ?
> * subpage of the huge page to split. The split operation does not change the
Trying to get away from "subpage", maybe "can point to any page within
the folio"?
I think following these suggestions throughout the text below will make
it clearer ...
> * position of @page.
> *
> * Prerequisites:
> *
> * 1) The caller must hold a reference on the @page's owning folio, also known as
> * the huge page.
> *
> * 2) The huge page must be locked.
> *
> * 3) The folio must not be pinned. Pinned folios will not be split; instead,
> * the caller will receive an -EBUSY.
> *
> * After splitting, the folio's refcount is transfered to @page (not the head
> * page, unless @page is actually the head page). The other subpages may be
> * freed if they are not mapped.
> *
> * If @list is null, tail pages will be added to LRU list, otherwise, to @list.
> *
> * Both head page and tail pages will inherit mapping, flags, and so on from the
> * hugepage.
> *
> * Returns 0 if the hugepage was split successfully.
> *
> * Returns -EBUSY if @page's folio is pinned, or if the anon_vma disappeared
> * from under us.
> */
> int split_huge_page_to_list(struct page *page, struct list_head *list)
>
> thanks,
> --
> John Hubbard
> NVIDIA
>
next prev parent reply other threads:[~2024-03-14 17:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 3:16 Matthew Wilcox
2024-03-13 9:20 ` David Hildenbrand
2024-03-13 15:27 ` Matthew Wilcox
2024-03-13 16:53 ` David Hildenbrand
2024-03-13 18:52 ` Jane Chu
2024-03-13 22:25 ` John Hubbard
2024-03-14 2:46 ` updated documentation: " John Hubbard
2024-03-14 16:22 ` David Hildenbrand
2024-03-14 17:51 ` John Hubbard
2024-03-14 17:45 ` Matthew Wilcox [this message]
2024-03-14 17:57 ` John Hubbard
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=ZfM31mgv1XYCeSbT@casper.infradead.org \
--to=willy@infradead.org \
--cc=david@redhat.com \
--cc=jane.chu@oracle.com \
--cc=jhubbard@nvidia.com \
--cc=linux-mm@kvack.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