Re: [PATCH 2/2] cgroup/misc: Change counters to be explicit 64bit types

From: Haitao Huang
Date: Thu Jul 20 2023 - 22:48:49 EST


Hi
On Tue, 18 Jul 2023 17:52:10 -0500, Tejun Heo <tj@xxxxxxxxxx> wrote:

On Mon, Jul 17, 2023 at 06:08:45PM -0700, Haitao Huang wrote:
So the variables can account for resources of huge quantities even on
32-bit machines.

Signed-off-by: Haitao Huang <haitao.huang@xxxxxxxxxxxxxxx>

Applied to cgroup/for-6.6 with some whitespace adjustments. I think the code
is broken when we cross the signed boundary but that's not a new problem
caused by your patch. I think what we should do is to treat atomic64_t reads
as u64 instead of putting it in s64.


Thanks. I think you meant the 'new_usage' in try_charge.
I'll send a patch.
BR
Haitao