Re: [PATCH memcg] mm/page_alloc.c: avoid statistic update with 0

From: Chris Down
Date: Tue Oct 12 2021 - 08:02:12 EST


Vasily Averin writes:
Yes, it's not a bug, it just makes the kernel a bit more efficient in a very unlikely case.
However, it looks strange and makes uninformed code reviewers like me worry about possible
problems inside the affected functions. No one else calls these functions from 0.

This statement is meaningless without data. If you have proof that it makes the kernel more efficient, then please provide the profiles.

As it is I'd be surprised if this improved things. Either the code is hot enough that the additional branch is cumbersome, or it's cold enough that it doesn't even matter.