On Mon, Nov 04, 2019 at 10:41:10AM +0800, Huang, Ying wrote: > >> +#define NUMA_SCAN_NR_HIST 16 > >> + int numa_scan_idx; > >> + unsigned long numa_scan_jiffies[NUMA_SCAN_NR_HIST]; > >> + unsigned long numa_scan_starts[NUMA_SCAN_NR_HIST]; > > > > Why 16? This is 4 cachelines. > > We want to keep the NUMA scanning history reasonably long. From > task_scan_min(), the minimal interval between task_numa_work() running > is about 100 ms by default. So we can keep 1600 ms history by default > if NUMA_SCAN_NR_HIST is 16. If user choose to use smaller > sysctl_numa_balancing_scan_size, then we can only keep shorter history. > In general, we want to keep no less than 1000 ms history. So 16 appears > like a reasonable choice for us. Any other suggestion? This is very good information for Changelogs and comments :-)