From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-102.mta0.migadu.com [91.218.175.102]) (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 8C4AB4AD7DB for ; Wed, 2 Sep 2026 17:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.102 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788371018; cv=none; b=s26EsCjLKK8YwLVCRSlyUcxgr5TzxS5F8Ji5d09PegCa0ZSszKS7/4DVZKNsdc42aqNYrQ5jWjbEEH0PbkWHWnLjbCgPwNicSHhlYVV6lvCDPLoqgJLEGGczVwmzIq93aZHx9YJzD89rGzRWYsLUTalokPec4t5r7DeWvRFZxXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788371018; c=relaxed/simple; bh=yb0bO+jMr8HKLSvckBXSyVmp7KoF8OjxYY9x1SSRZYA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=poSPA1a0lYYsGNxxNZjxBRUBM8FWH867P+2lLDIT1HW34S1pMA6JIb9bmkxaGDvday0kropg2GPiG5Nr+SYg2gSGIFabbgN4XUXUdD0EuPznLlBTHniclKpc6FXB0zBMcj3D6AHggg9f0zZmYJupHX7KhUcsoRcYaw97kEagjQ4= 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=qPkpbEWq; arc=none smtp.client-ip=91.218.175.102 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="qPkpbEWq" X-Envelope-To: cgroups@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=yb0bO+jMr8HKLSvckBXSyVmp7KoF8OjxYY9x1SSRZYA=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788371014; v=1; x=1788975814; b=qPkpbEWqSPfFlplLW/5zTmAGsK+Jgvw2LuSv7x9rDbxggeSRB3s6CVgDIsfoeI7oeCwMd7W5 kiruYEpW/cDGYTJ6M09RoGkjeK8tmrMZ2d+bAvXNYSqgayxFYsggEzS1P8+XSgYY0YrHpwGBqGG 4GH68oM3b307PecVmXl2tV5o= X-Envelope-To: cgroups@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id ea98a50b791055b0; Wed, 02 Sep 2026 17:43:34 +0000 X-Mizu-Trace-ID: ea98a50b791055b0 X-Migadu-Flow: FLOW_OUT From: Shakeel Butt To: Andrew Morton Cc: Michal Hocko , Johannes Weiner , Roman Gushchin , Muchun Song , David Hildenbrand , Lorenzo Stoakes , Kairui Song , Qi Zheng , Barry Song , Axel Rasmussen , tjmercier@google.com, Meta kernel team , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/8] memcg: remove the per-node soft limit tree fields Date: Wed, 2 Sep 2026 10:43:09 -0700 Message-ID: <20260902174311.1772372-7-shakeel.butt@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260902174311.1772372-1-shakeel.butt@linux.dev> References: <20260902174311.1772372-1-shakeel.butt@linux.dev> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit tree_node, usage_in_excess and on_tree only existed for the soft limit rbtree. They also doubled as the buffer between the read-mostly head of struct mem_cgroup_per_node and its update-often tail, so replace them with the explicit padding that CONFIG_MEMCG_V1=n already used. Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Lorenzo Stoakes (ARM) --- include/linux/memcontrol.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 11c1fa88d6fd..1eababed16f5 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -95,20 +95,7 @@ struct mem_cgroup_per_node { struct lruvec_stats *lruvec_stats; struct shrinker_info __rcu *shrinker_info; -#ifdef CONFIG_MEMCG_V1 - /* - * Memcg-v1 only stuff in middle as buffer between read mostly fields - * and update often fields to avoid false sharing. If v1 stuff is - * not present, an explicit padding is needed. - */ - - struct rb_node tree_node; /* RB tree node */ - unsigned long usage_in_excess;/* Set to the value by which */ - /* the soft limit is exceeded*/ - bool on_tree; -#else CACHELINE_PADDING(_pad1_); -#endif /* Fields which get updated often at the end. */ struct lruvec lruvec; -- 2.53.0-Meta