From: David Hildenbrand <david@redhat.com>
To: Lance Yang <ioworker0@gmail.com>
Cc: Barry Song <21cnbao@gmail.com>,
akpm@linux-foundation.org, dj456119@gmail.com,
ryan.roberts@arm.com, shy828301@gmail.com, ziy@nvidia.com,
libang.li@antgroup.com, baolin.wang@linux.alibaba.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Mingzhe Yang <mingzhe.yang@ly.com>
Subject: Re: [PATCH v3 1/2] mm: add per-order mTHP split counters
Date: Fri, 5 Jul 2024 12:55:58 +0200 [thread overview]
Message-ID: <c9c98cbf-711c-4755-ae99-fb13aeb51381@redhat.com> (raw)
In-Reply-To: <CAK1f24=M0i_Wisf9NHGcyo4wJ90a5QYefm=+rck5XAXMg1QNJQ@mail.gmail.com>
On 05.07.24 12:48, Lance Yang wrote:
> Hi David and Barry,
>
> Thanks a lot for paying attention!
>
> On Fri, Jul 5, 2024 at 6:14 PM David Hildenbrand <david@redhat.com> wrote:
>>
>> On 05.07.24 12:12, Barry Song wrote:
>>> On Fri, Jul 5, 2024 at 9:08 PM David Hildenbrand <david@redhat.com> wrote:
>>>>
>>>>> @@ -3253,8 +3259,9 @@ int split_huge_page_to_list_to_order(struct page *page, struct list_head *list,
>>>>> i_mmap_unlock_read(mapping);
>>>>> out:
>>>>> xas_destroy(&xas);
>>>>> - if (is_thp)
>>>>> + if (order >= HPAGE_PMD_ORDER)
>>>>
>>>> We likely should be using "== HPAGE_PMD_ORDER" here, to be safe for the
>>>> future.
>>>
>>> I feel this might need to be separate since all other places are using
>>> folio_test_pmd_mappable() ?
>>
>> Likely, but as you are moving away from this ... this counter here does
>> and will always only care about HPAGE_PMD_ORDER.
>
> I appreciate the different opinions on whether we should use
> ">= HPAGE_PMD_ORDER" or "==" for this check.
>
> In this context, let's leave it as is and stay consistent with
> folio_test_pmd_mappable() by using ">= HPAGE_PMD_ORDER",
> what do you think?
I don't think it's a good idea to add more wrong code that is even
harder to grep (folio_test_pmd_mappable would give you candidates that
might need attention). But I don't care too much. Maybe someone here can
volunteer to clean up these instances to make sure we check PMD-size and
not PMD-mappable for these counters that are for PMD-sized folios only,
even in the future with larger folios?
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-07-05 10:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 1:29 [PATCH v3 0/2] mm: introduce " Lance Yang
2024-07-04 1:29 ` [PATCH v3 1/2] mm: add " Lance Yang
2024-07-05 9:08 ` David Hildenbrand
2024-07-05 10:12 ` Barry Song
2024-07-05 10:14 ` David Hildenbrand
2024-07-05 10:48 ` Lance Yang
2024-07-05 10:55 ` David Hildenbrand [this message]
2024-07-05 11:19 ` Lance Yang
2024-07-05 11:31 ` Lance Yang
2024-07-04 1:29 ` [PATCH v3 2/2] mm: add docs for " Lance Yang
2024-07-05 9:09 ` David Hildenbrand
2024-07-05 9:16 ` Ryan Roberts
2024-07-05 9:25 ` David Hildenbrand
2024-07-05 11:08 ` Lance Yang
2024-07-07 1:36 ` Lance Yang
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=c9c98cbf-711c-4755-ae99-fb13aeb51381@redhat.com \
--to=david@redhat.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dj456119@gmail.com \
--cc=ioworker0@gmail.com \
--cc=libang.li@antgroup.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingzhe.yang@ly.com \
--cc=ryan.roberts@arm.com \
--cc=shy828301@gmail.com \
--cc=ziy@nvidia.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