On 3/17/26 07:44, Huang, Ying wrote: > "JP Kobryn (Meta)" <[email protected]> writes: > >>>> >>>> It's an interesting thought. Looking into these existing counters more, >>>> the in-kernel direct node allocations, which don't fall under any >>>> mempolicy, are also included in these stats. One good example might be >>>> include/linux/skbuff.h, where __dev_alloc_pages() calls >>>> alloc_pages_node_noprof(NUMA_NO_NODE, ...) which eventually reaches >>>> zone_statistics() and increments the stats. >>> IIUC, the default memory policy is used here, that is, MPOL_LOCAL. >> >> I'm not seeing that. zone_statistics() is eventually reached. >> alloc_pages_mpol() is not. > > Yes. The page isn't allocated through alloc_pages_mpol(). For example, > if we want to allocate pages for the kernel instead of user space > applications. However, IMHO, the equivalent memory policy is > MPOL_LOCAL, that is, allocate from local node firstly, then fallback to > other nodes. I don't think that alloc_pages_mpol() is so special.
Agree, it's equivalent to MPOL_LOCAL. > --- > Best Regards, > Huang, Ying

