On 08/10/2026 8:30 am, Zenghui Yu wrote:
> On 9/19/26 8:24 AM, Kiryl Shutsemau wrote:
> 
>> +            } else {        /* madvise */
>> +                    while (now_ms() < end_ms && !corrupted) {
>> +                            for (i = 0; i < nr_shared_areas; i++) {
>> +                                    madvise(region + i * hpage_pmd_size,
>> +                                            hpage_pmd_size, MADV_COLLAPSE);
> 
> I got the following error when compiling it:
> 
> khugepaged_race.c: In function ‘main’:
> khugepaged_race.c:506:23: error: ‘MADV_COLLAPSE’ undeclared (first use in 
> this function); did you mean ‘MADV_COLD’?
>   506 |       hpage_pmd_size, MADV_COLLAPSE);
>       |                       ^~~~~~~~~~~~~
>       |                       MADV_COLD
> khugepaged_race.c:506:23: note: each undeclared identifier is reported only 
> once for each function it appears in
> make: *** [../lib.mk:225: 
> /data/code/mm/tools/testing/selftests/mm/khugepaged_race] Error 1

I've just tested with and without make headers on linux-next
which has this patch and I've not received such error.

If your system headers are old, running make headers can help.

> 
> Thanks,
> Zenghui


-- 
Thanks,
Usama

Reply via email to