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 >