[LTP] [PATCH] [RFC] [WORK-IN-PROGRESS] syscalls: Add set_mempolicy numa tests.
Jan Stancek
jstancek@redhat.com
Tue Aug 14 18:14:04 CEST 2018
----- Original Message -----
> Hi!
> > Why not use get_mempolicy(.., MPOL_F_NODE | MPOL_F_ADDR) to get node id,
> > for the page we just allocated?
>
> Good point, I will try to look into that.
>
> > This kinda overlaps with numa_helper in some aspects. Which reminds me
> > of some issues we had to address there:
> > - memory-less nodes
> > - nodes with little to no free memory
>
> I'm aware of the overlap and we should definitely merge these two into a
> single library later on.
>
> As far as I can tell the library I wrote covers the case of memory-less
> nodes, these should the the ones that does not have the membind flag set
> in the default mask that is returned by numa_get_membind().
Confirmed.
# ./a.out
available: 2 nodes (0-1)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
node 0 size: 0 MB
node 0 free: 0 MB
node 1 cpus:
node 1 size: 12288 MB
node 1 free: 11018 MB
node distances:
node 0 1
0: 10 40
1: 40 10
membind[0] = 0
membind[1] = 1
If this has support in older releases, it looks simpler than what
numa_helper is doing (iterating over sysfs).
Regards,
Jan
More information about the ltp
mailing list