Re: [PATCH] hugetlb: simplify hugetlb handling in follow_page_mask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
- Subject: Re: [PATCH] hugetlb: simplify hugetlb handling in follow_page_mask
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Fri, 2 Sep 2022 20:52:44 +0200
- Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, inuxppc-dev@xxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, "Aneesh Kumar K . V" <aneesh.kumar@xxxxxxxxxxxxx>, Naoya Horiguchi <naoya.horiguchi@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Muchun Song <songmuchun@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>
- In-reply-to: <YxJQfGSsbXd3W4m/@monkey>
- Organization: Red Hat
- References: <20220829234053.159158-1-mike.kravetz@oracle.com> <608934d4-466d-975e-6458-34a91ccb4669@redhat.com> <Yw5AOZ/Kc5f3UP+s@monkey> <Yw6Bpsow+gUMlHCU@monkey> <739dc825-ece3-a59f-adc5-65861676e0ae@redhat.com> <YxJQfGSsbXd3W4m/@monkey>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0
>>> Adding Christophe on Cc:
>>>
>>> Christophe do you know if is_hugepd is true for all hugetlb entries, not
>>> just hugepd?
>>>
>>> On systems without hugepd entries, I guess ptdump skips all hugetlb entries.
>>> Sigh!
>>
>> IIUC, the idea of ptdump_walk_pgd() is to dump page tables even outside
>> VMAs (for debugging purposes?).
>>
>> I cannot convince myself that that's a good idea when only holding the
>> mmap lock in read mode, because we can just see page tables getting
>> freed concurrently e.g., during concurrent munmap() ... while holding
>> the mmap lock in read we may only walk inside VMA boundaries.
>>
>> That then raises the questions if we're only calling this on special MMs
>> (e.g., init_mm) whereby we cannot really see concurrent munmap() and
>> where we shouldn't have hugetlb mappings or hugepd entries.
>>
>
> This is going to require a little more thought.
>
> Since Baolin's patch for stable releases is moving forward, I want to
> get the cleanup provided by this patch in ASAP. So, I am going to rebase
> this patch on Baolin's with the other fixups.
>
> Will come back to this cleanup later.
Sure, no need to do it all at once (I was just bringing it up while
thinking about it).
--
Thanks,
David / dhildenb
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]