From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CFC72D94B4 for ; Thu, 26 Mar 2026 02:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774492386; cv=none; b=LemQez4wmKOwG4ejkUF4ob2EAUtbF1+msYSN+IUIevmjb5GBdldcgsDVip1nCOVqbjYH6R1uAQLeRegoWOVMt6LcckNkTSbfabVpUU7xW37cTuITrHt4XvjZb2UYqb61r53YM0R6e2nanjUPgRi7Otr5XZpApIKVRGBmRbG3rVU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774492386; c=relaxed/simple; bh=xFGKLJbE5pziUEoCvLfe/2gnJK5Qyy8m4+wC2YU72Gw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dtkPZGbpt9Ce5wRmFokErcm9YCS6iQ5wRY5MDlMM3593N+2ufwqW9HDcvB1bo97U4uFUXZXMTy5gLTSb+QoLvVigOYJaIuuDxAtX5STNyJESyacoV6bAoZsnI3vtgeZ7gQDTBTCiquOWT1btsYRC7KNJFpzW+ejJ4mQHcAiKKP8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=okqT0U1n; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="okqT0U1n" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1774492382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uCRjoJaTn3y6hT3QphxtqsB3Bsvh01UxaQBXeZoDVU4=; b=okqT0U1n0SsshunYkv4Hi7vdiYSgo9Y/BfIDQDh3DsvlAKL7ooePGAdDvNrgv185u7Kt38 qRP3fsWVDLPCVGQ77EqViOA5+CH4mPDZSb/j97UeXj0e9vI9/Le+6ndC81puSkaud9AEpx 0JQjDRcDSKfF9Ui4PdpuGIXROT1kiBM= Date: Thu, 26 Mar 2026 10:32:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 1/4] mm: memcontrol: correct the type of stats_updates to unsigned long To: "Lorenzo Stoakes (Oracle)" Cc: hannes@cmpxchg.org, hughd@google.com, mhocko@suse.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, david@kernel.org, ziy@nvidia.com, harry.yoo@oracle.com, yosry.ahmed@linux.dev, imran.f.khan@oracle.com, kamalesh.babulal@oracle.com, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, chenridong@huaweicloud.com, mkoutny@suse.com, akpm@linux-foundation.org, hamzamahfooz@linux.microsoft.com, apais@linux.microsoft.com, lance.yang@linux.dev, bhe@redhat.com, usamaarif642@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng References: <158fa0b1296168047342f02050e9d2bda6888d27.1774447069.git.zhengqi.arch@bytedance.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qi Zheng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 3/25/26 11:28 PM, Lorenzo Stoakes (Oracle) wrote: > On Wed, Mar 25, 2026 at 10:13:22PM +0800, Qi Zheng wrote: >> From: Qi Zheng >> >> The memcg_rstat_updated() tracks updates for vmstats_percpu->state >> and lruvec_stats_percpu->state. Since these state values are of type long, >> change the val parameter passed to memcg_rstat_updated() to long as well. >> >> Correspondingly, change the type of stats_updates in struct >> memcg_vmstats_percpu and struct memcg_vmstats from unsigned int and >> atomic_t to unsigned long and atomic_long_t respectively to prevent >> potential overflow when handling large state updates during the >> reparenting of LRU folios. > > Do we need a Fixes, possibly cc: stable for that? Apologies if already > asked + answered. Before LRU folio reparenting was introduced, we wouldn’t pass in such a large value, so this wasn’t a problem. Since LRU folio reparenting is still in mm-unstable, so I didn't add a Fixes tag in [4/4]. > >> >> Signed-off-by: Qi Zheng > > Anyway logic seems fine to me, so: > > Reviewed-by: Lorenzo Stoakes (Oracle) Thanks!