Re: [PATCH v7 5/7] mm: sched: move NUMA balancing tiering promotion to pghot

From: Bharata B Rao

Date: Wed May 06 2026 - 02:20:58 EST


On 05-May-26 10:14 AM, Donet Tom wrote:
> Hi Bharata
>
> On 5/4/26 11:39 AM, Bharata B Rao wrote:
>>   +/*
>> + * For memory tiering mode, if there are enough free pages (more than
>> + * enough watermark defined here) in fast memory node, to take full
>> + * advantage of fast memory capacity, all recently accessed slow
>> + * memory pages will be migrated to fast memory node without
>> + * considering hot threshold.
>> + */
>> +static bool pgdat_free_space_enough(struct pglist_data *pgdat)
>> +{
>> +    int z;
>> +    unsigned long enough_wmark;
>> +
>> +    enough_wmark = max(1UL * 1024 * 1024 * 1024 >> PAGE_SHIFT,
>
> Just a thought—would it be better to use #define for these hardcoded values?

We could. It was a code movement, hence left it untouched.

Regards,
Bharata.