From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 644BD293C4E for ; Thu, 11 Dec 2025 02:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765421906; cv=none; b=cKeEKg7CbXwhU3V83odAZ8+yCwUiUByx70bx0O16x+KknKLXfS19O5+dKKfaU/QQMCowW/5fXKfak7FUMVX4vFcRZKhhqyriW5CcBsgd8TzxEyk+GmYIEpA5pIqjtgsnKqTDFpxdVdUVxEghR9XGfZOBfKsk+y2r7kGBWOQL1PA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765421906; c=relaxed/simple; bh=TDCP8jSTjqvfR2lbb+PqyLvPxdA+5/VnBnQRxLoH4ZI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SZbeEP+maHqaRFR5yE9zwHd8DZ1ijS+HX9sFbzEk9PeHBhoTiY6dKzTp1I/lQPB7qozW9L0pu5ZFIelmggg1y9t1IdQX/ytVVLCjpnmgkVVoiWbz/q22kyLIDwg+vZwNrz2Gj5Af8nnQO5LI7S/MuIa27036UlfJGgIsZt/orQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=uhBougWh; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="uhBougWh" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-8b2aa1ae006so78019985a.2 for ; Wed, 10 Dec 2025 18:58:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1765421903; x=1766026703; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4LfuhWoMqWAloJULoKj1IudIPQc7ilfqshnWS+4Dsvw=; b=uhBougWhGOJ1gplNd8NKYu/zvBOqeKdvkU3dmzOKc7AI8G0MvfciMa6tiofYel1N7n 20DX16fMDdDsk9yiNGhvLQ59lz8LlkVRCMtD8LkwkC8jY7uF/E3jkE2HOzVE8PjJprPd QTpDMVOBharrVm4Ppfp2w28o6XdxCYU615yM286YIF3TZ6m/eeM8g4tiJB8ebMfXBy5I 2Ch19EO5SIu1STT5Kkei0hBpCrTq8KbvQAyboSxLDdEHaNC9KNY8sGQsuVI0e2i8mNKs 1ZxZDp02wdNy6lsBMn7fXxQkz/3+5pWXDt4ouxsYfunNOC9KqbK2VAWkz+i4nog4yVr9 pVaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765421903; x=1766026703; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4LfuhWoMqWAloJULoKj1IudIPQc7ilfqshnWS+4Dsvw=; b=SJ1KDxaqam7RmD6iMxuXQWON08TSg6lcqMuIP5aKS07p2Qb5gpyA7IQkc6aYoiOwpC 3VcmkLwQu0CAzIBF612/EgZOvAs/fr9L7usEZSMMYzgW+4pkYycKHiIU+qowWCJf9uiu 1dmy7LGoqx+fH1/B0D2bKdeNv4cLglesBZaXz8OLVKQBhL7qkCQrSzXchTdS26Z245wP m/rkZgwlk/Humyg/MqMeWmLo+kIzSx0mA6jNljzzYEC0dVRKCEaGYPfGbCqzdAjUZQw9 RfhXbfnLvD5yiJnXp6zc9Z0Qm5xXejRh0LdrPmT4D3RuFWW1y5eHbmJBhQaONQYmC3BG KB2w== X-Forwarded-Encrypted: i=1; AJvYcCUVM0vWKZNTrAJBDKTkBo2BabuLsM0HIeN3B4q4BhPaRK0L2nU+FlUd9KyixHQfJHlEDVEFbeSA4L3lLks=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+ZvpebULMA+bvlvC1kpZM7XCVOXJbSTcKC70YMGVYtCqTcV8u Hq9FP7apwfz9NsDKDvVyc/c+V4s2blfbq80nNr7qQvxZv/k6Cgnrhf2NCmEXPVIXPSU= X-Gm-Gg: ASbGnct1FxXVx/aBg3bjbGPTWNkw5g7MAlNox6BW5nJZiHKlGT8umMgyJDHp2tGFWcO 7X4L7TqTO7hd/B4QXNgzLSR+B2j86RrEqY9wMILnMxLnUL+S+xQZK+zhyLYu3iyeXEHeI0CTl6f EZLcu0KIWs61aB6w+Q0bIKe6PyIZzh8iyRJDkw80ZHv5Nq3+4XjLxJCAgyW/RpVy8btuqCT6NzJ yW22QD/DImWKT0yH88CLKNIr/2GitH4R1C/Bi8tli1IiawTI+vPjW7evGcMJA8uq68kMVQpJbUr Ndblu/wGbpNDhiBGDYUE0lsFtx8uEFzxaiqpw+1Jg182/3lI/t1l6jbUFiBGx4ZYeK3STdNRcrs U2mxHMyiql7BHjNnxEnVTNRTwr4mFCT8i/No+p6qBiQNrpU4pvaOdGz53Pnrpz5CJ3RgzTe5ASt PWdfw0He7Ynm7kvZaPb2M4 X-Google-Smtp-Source: AGHT+IFoXwBG0n5fP0BNrUvena3y71ni22tWG0aSIY3lZQj1Rng9OU7AuijjB7Oixr4MMXI+LjJMQg== X-Received: by 2002:a05:620a:2a11:b0:84a:71fc:a16a with SMTP id af79cd13be357-8ba39d46b56mr689168385a.37.1765421903169; Wed, 10 Dec 2025 18:58:23 -0800 (PST) Received: from localhost ([2603:7000:c01:2716:929a:4aff:fe16:c778]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8bab47f6f15sm113968985a.0.2025.12.10.18.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Dec 2025 18:58:22 -0800 (PST) Date: Wed, 10 Dec 2025 21:58:21 -0500 From: Johannes Weiner To: Chen Ridong Cc: mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, akpm@linux-foundation.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, david@kernel.org, zhengqi.arch@bytedance.com, lorenzo.stoakes@oracle.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, lujialin4@huawei.com Subject: Re: [PATCH -next v3 2/2] memcg: remove mem_cgroup_size() Message-ID: <20251211025821.GC643576@cmpxchg.org> References: <20251211013019.2080004-1-chenridong@huaweicloud.com> <20251211013019.2080004-3-chenridong@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251211013019.2080004-3-chenridong@huaweicloud.com> On Thu, Dec 11, 2025 at 01:30:19AM +0000, Chen Ridong wrote: > From: Chen Ridong > > The mem_cgroup_size helper is used only in apply_proportional_protection > to read the current memory usage. Its semantics are unclear and > inconsistent with other sites, which directly call page_counter_read for > the same purpose. > > Remove this helper and get its usage via mem_cgroup_protection for > clarity. Additionally, rename the local variable 'cgroup_size' to 'usage' > to better reflect its meaning. > > No functional changes intended. > > Signed-off-by: Chen Ridong Acked-by: Johannes Weiner