From: Matthew Wilcox <willy@infradead.org>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 5/7] mm: Replace hpage_nr_pages with thp_nr_pages
Date: Mon, 29 Jun 2020 19:32:28 +0100 [thread overview]
Message-ID: <20200629183228.GH25523@casper.infradead.org> (raw)
In-Reply-To: <20200629181440.GG25523@casper.infradead.org>
On Mon, Jun 29, 2020 at 07:14:40PM +0100, Matthew Wilcox wrote:
> Thank you! Clearly I wasn't thinking about this patch and just did a
> mindless search-and-replace! I should evaluate the other places where
> I did this and see if any of them are wrong too.
add_page_to_lru_list() and friends -- safe. hugetlbfs doesn't use the
LRU lists.
find_subpage() -- safe. hugetlbfs has already returned by this point.
readahead_page() and friends -- safe. hugetlbfs doesn't readahead.
isolate_migratepages_block() -- probably safe. I don't think hugetlbfs
pages are migratable, and it calls del_page_from_lru_list(), so I
infer hugetlbfs doesn't reach this point.
unaccount_page_cache_page() -- safe. hugetlbfs has already returned by
this point.
check_and_migrate_cma_pages() -- CMA pages aren't hugetlbfs pages.
mlock_migrate_page() -- not used for hugetlbfs.
mem_cgroup_move_account() mem_cgroup_charge() mem_cgroup_migrate()
mem_cgroup_swapout() mem_cgroup_try_charge_swap() -- I don't think
memory cgroups control hugetlbfs pages.
do_migrate_range() -- explicitly not in the hugetlb arm of this if
statement
migrate_page_add() -- Assumes LRU
putback_movable_pages() -- Also LRU
expected_page_refs() migrate_page_move_mapping() copy_huge_page()
unmap_and_move() add_page_for_migration() numamigrate_isolate_page()
-- more page migration
mlock.c: This is all related to being on the LRU list
page_io.c: We don't swap out hugetlbfs pages
pfn_is_match() -- Already returned from this function for hugetlbfs pages
do_page_add_anon_rmap() page_add_new_anon_rmap() rmap_walk_anon()
-- hugetlbfs pages aren't anon.
rmap_walk_file() -- This one I'm unsure about. There's explicit
support for hugetlbfs elsewhere in the file, and maybe this is never
called for hugetlb pages. Help?
swap.c, swap_state.c, swapfile.c: No swap for hugetlbfs pages.
vmscan.c: hugetlbfs pages not on the LRUs
workingset.c: hugetlbfs pages not on the LRUs
So I think you found the only bug of this type, although I'm a little
unsure about the rmap_walk_file().
next prev parent reply other threads:[~2020-06-29 21:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 15:19 [PATCH 0/7] THP prep patches Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 1/7] mm: Store compound_nr as well as compound_order Matthew Wilcox (Oracle)
2020-06-29 16:22 ` Ira Weiny
2020-06-29 16:24 ` Matthew Wilcox
2020-07-06 10:29 ` Kirill A. Shutemov
2020-08-11 22:53 ` Matthew Wilcox
2020-06-29 15:19 ` [PATCH 2/7] mm: Move page-flags include to top of file Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 3/7] mm: Add thp_order Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 4/7] mm: Add thp_size Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 5/7] mm: Replace hpage_nr_pages with thp_nr_pages Matthew Wilcox (Oracle)
2020-06-29 17:40 ` Mike Kravetz
2020-06-29 18:14 ` Matthew Wilcox
2020-06-29 18:32 ` Matthew Wilcox [this message]
2020-07-01 1:33 ` Andrew Morton
2020-06-29 15:19 ` [PATCH 6/7] mm: Add thp_head Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 7/7] mm: Introduce offset_in_thp Matthew Wilcox (Oracle)
2020-06-29 17:11 ` [PATCH 0/7] THP prep patches William Kucharski
2020-06-29 18:13 ` Zi Yan
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=20200629183228.GH25523@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.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).