Re: [PATCH 3/3] mm: memcontrol: correct the nr_pages parameter type of mem_cgroup_update_lru_size()

From: Qi Zheng

Date: Tue Mar 24 2026 - 23:35:36 EST




On 3/25/26 8:27 AM, Harry Yoo (Oracle) wrote:
On Tue, Mar 24, 2026 at 12:28:08PM +0000, Lorenzo Stoakes (Oracle) wrote:
On Tue, Mar 24, 2026 at 07:31:29PM +0800, Qi Zheng wrote:
From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>

The nr_pages parameter of mem_cgroup_update_lru_size() should clearly
be long instead of int, let's correct it.

Hmm, but are you ever going to be adding that many pages? I guess technically
correct though.

It has been fine as-is, but reparenting changes that.
Reparenting in theory could add billions of pages at once!

Right. Thanks for the explanation!


And yeah the commit message could be improved.

Yes, I've omitted a lot of background information, which might seem
abrupt to some reviewers unfamiliar with it. I will improve this in the
next version.

Thanks,
Qi