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

Thanks,
Zenghui

Reply via email to