From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 E600C38D for ; Sat, 27 Jun 2026 00:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782518618; cv=none; b=bcGJ1JLPqx9xuYPNnNvFJzvRTlHwcEKNJv9aVr/Qp4emOWOL+loiHEE2Vq8FRS5lU7Sg4QEpCLZYdQAg1A7H1P1m5OvyGx42OrxdWw4J9jpCEnF3CchiUeXqfVQezVaHhvwSUgJq4/TFjqFeSPj8Qs5zLQxJIMpaYQ1lTfOWenw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782518618; c=relaxed/simple; bh=lYf898hunEgSW0ZHYKR8e7s9pAnnfGRsXXJ/Ps5DykU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=iU4q9t0B4USD3ZI42BjLAGJggPgFUlbHRoS31wQiUsZm/1kENvP8I6laiQ+ukGOlvkwaJIFZtkrD6LBxyOvnalJ2XWSqE+4M1nlkCHR1xLNZLdWI2k+z1KakjOk0ex1+8g4HRAwBgDbamFwfy5kUnnhrjQwbjlj/275wCe5d63c= 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=tqlKQhv5; arc=none smtp.client-ip=91.218.175.173 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="tqlKQhv5" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782518614; 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: in-reply-to:in-reply-to:references:references; bh=lYf898hunEgSW0ZHYKR8e7s9pAnnfGRsXXJ/Ps5DykU=; b=tqlKQhv5JQkI6bokcL3pmaPWOOWl2ckxjfKRqvwOECpLWTkl4P3IgJ0Ch953pXdFMYE4rs HPAtt49lrbt1Cg0Y+fpGHB8jZPJOoWVnkMwsN26RpI78rCxPP+Tnf1XEYs4/59S3deHqF0 K7+/RjlRVoONF7/uOrgivtTgPHZbnQE= From: Roman Gushchin To: Joshua Hahn Cc: linux-mm@kvack.org, Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-kernel@kvger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm/memcontrol: remove unused for_each_mem_cgroup macro and cleanup In-Reply-To: <20260624183700.1152742-1-joshua.hahnjy@gmail.com> (Joshua Hahn's message of "Wed, 24 Jun 2026 11:36:59 -0700") References: <20260624183700.1152742-1-joshua.hahnjy@gmail.com> Date: Fri, 26 Jun 2026 17:03:29 -0700 Message-ID: <87jyrkdf3i.fsf@linux.dev> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Joshua Hahn writes: > Commit 7e1c0d6f58207 ("memcg: switch lruvec stats to rstat") removed the > last caller of for_each_mem_cgroup back in 2021, and there have not been > any new callers since. Remove the macro. > > A comment in mem_cgroup_css_online has also been out of date since 2021, > when 2bfd36374edd9 ("mm: vmscan: consolidate shrinker_maps handling > code") open-coded the for_each_mem_cgroup iterator. Update the comment. > > Finally, 99430ab8b804c ("mm: introduce BPF kfuncs to access memcg > statistics and events") added a second declaration for memcg_events to > include/linux/memcontrol.h, duplicating the one in mm/memcontrol-v1.h. > Let's clean that up too. > > No functional changes intended. > > Signed-off-by: Joshua Hahn Acked-by: Roman Gushchin