On 2020-01-21 at 22:53 Michal Hocko wrote: >On Tue 21-01-20 22:15:43, Li Xinhai wrote: >[...] >> Knowing about misplaced pages from mbind will give me flexibility for >> choosing different solutions. > >Would /proc/pid/numa_maps help to give you rough idea which mappings >of interest have misplaced pages and move_pages for those? It is still >allocating arrays but is that really a big deal? numa_maps can be checked about misplaced pages, and I mentioned it in previous mail for this purpose. For my case, using move_pages() is necessary for later action. The only difference is about mbind() could give feedback of misplaced page on impacted range, numa_mpas requres me iterate over maps (that will collect states on those maps although don't been used) to reach impacted range and check it. I may assume there is no much difference on overall performance, it is more about coding effort in user sapce application. I've being try to apply patch for mbind(i.e., apply STRICT on hugetlb mapping), and may sharing it after verification and let's see if that is usable, thanks. >-- >Michal Hocko >SUSE Labs