Dave Hansen <dave.hansen@xxxxxxxxx> writes: > On 11/4/21 2:13 AM, Baolin Wang wrote: >> +What: /sys/kernel/mm/numa/demotion_mode >> +Date: November 2021 >> +Contact: Linux memory management mailing list <linux-mm@xxxxxxxxx> >> +Description: Set the demotion mode when enabling demoting pages during reclaim > > I don't think we need a tunable for this. The existing behavior is just > stupid for your hardware and can be replaced. Yes. I think so too. I don't think DIRECT_DEMOTION is reasonable for your system. > Let's also try to do it with the existing node_demotion[] data > structure before we go adding more. To avoid cache ping-pong, I guess some kind of per-CPU data structure may be more suitable for interleaving among multiple nodes. Best Regards, Huang, Ying