Re: [PATCH] mm, compaction: Indicate when compaction is manually triggered by sysctl

From: Guilherme G. Piccoli
Date: Thu May 07 2020 - 22:14:51 EST


On Thu, May 7, 2020 at 8:04 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Could add it to vmstat?

Hi Andrew, thanks for your suggestion! I thought the same, as a second
potential solution for this..was planning to add as a comment below
the "---" but forgot heheh
I agree that would be great in vmstat, do you have a name suggestion
for it? "compaction_triggered" maybe?


> Userspace could write to /dev/kmsg when it decides to trigger
> compaction? Although using the kernel log seems a fairly lame way for
> userspace to record its own actions...
Well...you can think that the problem we are trying to solve was more
like...admin forgot if they triggered or not the compaction hehe
So, counting on the user to keep track of it is what I'd like to
avoid. And thinking about drop_caches (that have an indication when
triggered) makes me think this indeed does make sense for compaction
too.
Cheers,

Guilherme