[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C1584B11-84DA-4BF8-9FA2-75867B709F7A@nvidia.com>
Date: Sat, 20 Jul 2024 09:47:15 -0400
From: Zi Yan <ziy@...dia.com>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
David Hildenbrand <david@...hat.com>, "Huang, Ying" <ying.huang@...el.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] memory tiering: introduce folio_has_cpupid() check
On 20 Jul 2024, at 3:50, Kefeng Wang wrote:
> On 2024/7/19 22:43, Zi Yan wrote:
>> Instead of open coded check for if memory tiering mode is on and a folio
>> is in the top tier memory, use a function to encapsulate the check.
>>
>> Signed-off-by: Zi Yan <ziy@...dia.com>
>> Reviewed-by: "Huang, Ying" <ying.huang@...el.com>
>> ---
>> include/linux/memory-tiers.h | 8 ++++++++
>> kernel/sched/fair.c | 3 +--
>> mm/huge_memory.c | 6 ++----
>> mm/memory-tiers.c | 17 +++++++++++++++++
>> mm/memory.c | 3 +--
>> mm/mprotect.c | 3 +--
>> 6 files changed, 30 insertions(+), 10 deletions(-)
>>
>> diff --git a/include/linux/memory-tiers.h b/include/linux/memory-tiers.h
>> index 0dc0cf2863e2..10c127d461c4 100644
>> --- a/include/linux/memory-tiers.h
>> +++ b/include/linux/memory-tiers.h
>> @@ -73,6 +73,10 @@ static inline bool node_is_toptier(int node)
>> }
>> #endif
>> +
>> +bool folio_has_cpupid(struct folio *folio);
>> +
>> +
>> #else
>> #define numa_demotion_enabled false
>> @@ -151,5 +155,9 @@ static inline struct memory_dev_type *mt_find_alloc_memory_type(int adist,
>> static inline void mt_put_memory_types(struct list_head *memory_types)
>> {
>> }
>> +static inline bool folio_has_cpupid(struct folio *folio)
>> +{
>> + return true;
>> +}
>
> Maybe better to move into mm.h since most folio_foo_cpupid()s are there?
Sounds good to me. Will do that in the next version.
--
Best Regards,
Yan, Zi
Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)
Powered by blists - more mailing lists