[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4de00290-7c29-42f5-b8aa-58a77b17c1d5@redhat.com>
Date: Mon, 15 Sep 2025 10:10:37 +0200
From: David Hildenbrand <david@...hat.com>
To: Balbir Singh <balbirs@...dia.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: damon@...ts.linux.dev, dri-devel@...ts.freedesktop.org,
Andrew Morton <akpm@...ux-foundation.org>, Zi Yan <ziy@...dia.com>,
Joshua Hahn <joshua.hahnjy@...il.com>, Rakie Kim <rakie.kim@...com>,
Byungchul Park <byungchul@...com>, Gregory Price <gourry@...rry.net>,
Ying Huang <ying.huang@...ux.alibaba.com>,
Alistair Popple <apopple@...dia.com>, Oscar Salvador <osalvador@...e.de>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Lyude Paul <lyude@...hat.com>,
Danilo Krummrich <dakr@...nel.org>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Ralph Campbell <rcampbell@...dia.com>,
Mika Penttilä <mpenttil@...hat.com>,
Matthew Brost <matthew.brost@...el.com>,
Francois Dugast <francois.dugast@...el.com>
Subject: Re: [v5 02/15] mm/huge_memory: add device-private THP support to PMD
operations
>>> +
>>
>> Wrong indentation.
>
> checkpatch.pl did not complain, what I see is
>
> + VM_WARN_ON(!is_pmd_migration_entry(pmd) &&
> + !is_pmd_device_private_entry(pmd));
>
David complains :)
> It looks different in your reply (is your email converting tabs to space?
> did you want me to align the conditions?
Indeed, looks wrong, not sure why. Likely I messed it up.
>
> + VM_WARN_ON(!is_pmd_migration_entry(pmd) &&
> + !is_pmd_device_private_entry(pmd));
>
>
Exactly.
>
>>
>>> + if (is_migration_entry(entry) &&
>>> + !is_readable_migration_entry(entry)) {
>>
>> Dito.
>>
>
> Same as above :)
>
>
>> Wonder if we want to be more explicit.
>>
>> if (is_readable_migration_entry(enrty) ||
>> is_readable_exclusive_migration_entry)) {
>>
>
> !is_readable_migration_entry => writable entry or read exclusive, did you mean is_writable_migration_entry()
> above?
Yes, sorry, my brain was dizzy after all the review lately.
if (is_writable_migration_entry(enrty) ||
is_readable_exclusive_migration_entry))
[...]
>>
>> Couldn't we do here
>>
>> if (!pmd_present(pmdval))
>> goto nomap;
>>
>> To replace the original pmd_none() .. check.
>>
>> A page table must always be present IIRC.
>>
>
> I am not sure about the pmd_none(), a page table may not be present, I've not audited
> the callers. But I think we can do
IIRC page tables must always have the present bit set. So we can just
simplify to the single pmd_present() check.
--
Cheers
David / dhildenb
Powered by blists - more mailing lists