On Thu, Oct 08, 2026 at 10:23:22PM +0800, Zenghui Yu wrote:
> On 10/8/26 4:18 PM, Muhammad Usama Anjum wrote:
> 
> > 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.
> 
> I forgot to mention that this can be fixed like fd5295afae91.

Right. Would you like to send the fix?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Reply via email to