On Fri, Aug 5, 2022 at 12:52 PM Alex Zhu (Kernel) <alexlzhu@xxxxxx> wrote: > > > > > > Ah! So when that exists, this interface tells us "how well" we're doing. > > > > Yes, exactly. > > > > Yeah, debugfs seems like a better place. And I'd love to see the shrinker > > code. Before you mentioned that I was having all kinds of peculiar > > feelings about this code. For example, suppose you have incredibly hot > > 256kB of data, but the other 1792kB of data are never touched ... that > > could cause us to do entirely the wrong thing and break up this THP. > > Having it as a shrinker makes sense because the hot 256kB will keep the > > THP from reaching the end of the list and being reclaimed. > > Sounds good, I’ll move this to debugfs then. Will follow up with the shrinker code > in another patch. The shrinker relies on this scanning thread to figure out which > THPs to reclaim. I'm wondering whether you could reuse the THP deferred split shrinker or not. It is already memcg aware. > > What are your thoughts regarding integrating this with DAMON?