On Tue, Oct 29, 2024 at 08:34:34AM +0800, Huang, Ying wrote:
Gregory Price gourry@gourry.net writes:
On Mon, Oct 28, 2024 at 01:45:48PM -0700, Yang Shi wrote:
On Fri, Oct 25, 2024 at 7:17 AM Gregory Price gourry@gourry.net wrote:
This path happens for SUCCESSFUL migrations, not failures. Typically callers to migrate_pages are required to handle putback/accounting for failures, but this is already handled in the shrink code.
AFAIK, MGLRU doesn't dec/inc this counter, so it is not double-decrement for MGLRU. Maybe "imbalance update" is better? Anyway, it is just a nit. I'd suggest capturing the MGLRU case in the commit log too.
Gotcha, so yeah saying it's an imbalance fix is more accurate.
So more accurate changelog is:
...
I think that it may be better to mention the different behavior of LRU and MGLRU. But that's not a big deal, change it again only if you think it's necessary.
The behavior isn't really different. It's either way migrate_pages decrements when it shouldn't going through the shink code - and both LRU and MGLRU go through the same code. That LRU does an inc/dec pair is irrelevant - neither should do the decrement in the migrate path.
~Gregory