Re: "alloc_tag was not set" when running mm/ksft_hmm.sh
From: Alistair Popple
Date: Tue May 12 2026 - 02:47:26 EST
On 2026-05-12 at 11:05 +1000, Zenghui Yu <yuzenghui@xxxxxxxxxx> wrote...
> On 2026/5/12 0:38, Zenghui Yu wrote:
> > Hi David,
> >
> > On 5/11/26 8:47 PM, David Hildenbrand (Arm) wrote:
> > >
> > > We do have a call to pgalloc_tag_split() in __split_unmapped_folio(), invoked in
> > > __folio_freeze_and_split_unmapped() before calling
> > > zone_device_private_split_cb() when iterating the folios.
> >
> > If I read the code correctly, pgalloc_tag_split() in
> > __split_unmapped_folio() deals with device private pages' alloc tag. But
> > what alloc_tag_sub_check() warns on are real system memory pages (device
> > page's backing page), which are allocated by
> > dmirror_devmem_alloc_page()/folio_page().
>
> Sorry, I meant dmirror_devmem_alloc_page()/folio_alloc().
Sorry, this crossed my other reply. The above analysis is correct - we don't
call pgalloc_tag_split() for the backing folio. Doing that fixes the problem,
but I'm not sure it's the cleanest way to fix things - arguably we shouldn't be
allocating compound folios for the backing store anyway.
- Alistair
> Thanks,
> Zenghui