On Thu, 25 Jan 2024 13:37:02 -0800 (PST) David Rientjes <rientjes@xxxxxxxxxx> wrote: > > On Thu, 25 Jan 2024, Matthew Wilcox wrote: > > > On Thu, Jan 25, 2024 at 12:04:37PM -0800, David Rientjes wrote: > > > On Thu, 25 Jan 2024, Matthew Wilcox wrote: > > > > On Thu, Jan 25, 2024 at 10:26:19AM -0800, David Rientjes wrote: [...] > This is **exactly** the type of discussion we're looking to have :) > > There are some things that I've chatted informally with folks about that > I'd like to bring to the forum: > > - Decoupling CPU migration from memory migration for NUMA Balancing (or > perhaps deprecating CPU migration entirely) > > - Allowing NUMA Balancing to do migration as part of a kthread > asynchronous to the NUMA hint fault, in kernel context > > - Abstraction for future hardware devices that can provide an expanded > view into page hotness that can be leveraged in different areas of the > kernel, including as a backend for NUMA Balanacing to replace NUMA > hint faults > > - Per-container support for configuring balancing and memory migration > > - Opting certain types of memory into NUMA Balancing (like tmpfs) while > leaving other types alone > > - Utilizing hardware accelerated memory migration as a replacement for > the traditional migrate_pages() path when available > > I could go code all of this up and spend an enormous amount of time doing > so only to get NAKed by somebody because I'm ripping out their critical > use case that I just didn't know about :) There's also the question of > whether DAMON should be the source of truth for this or it should be > decoupled. I wouldn't dare to say DAMON should be the source of truth, but I hope DAMON to be somewhat useful. DAMON is designed to be able to be easily extended[1] for various access monitoring / memory management primitives including hardware features. DAMOS of today provides a feature called filter[2], which allows applying specific operations to specific pages depending on their non-access-pattern information including type (anon vs file-backed) and which memcg it belongs to. Hence I think DAMON might be able to be used for a few of above cases. [1] https://docs.kernel.org/mm/damon/design.html#configurable-operations-set [2] https://docs.kernel.org/mm/damon/design.html#filters Thanks, SJ [...]