From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 8795C1487DD for ; Sat, 25 Jan 2025 01:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737768353; cv=none; b=Q3RR83n4w5toJ/QdEVZVHQohJMcz5JfOQfj0PwxpuiABTv7XHm0nvA1S3nayZVwfy0eM+vRka5p0IKiQ2I7wU5aJrIJLGTm4EPzMFcoO8LwRbHtoo5EodTgAR5n73nerSxbS5wP9nn/JLOVfnSo+d6ZTlntLgUj4NTIuRftR3qY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737768353; c=relaxed/simple; bh=Qn4DDsIlup8AL+LbIWOmZBqOfG1yOYsV0UYpqQPx6Wc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WaiQJACWkdspa5MkR8bCoExmvsBa6rTWHXEEgXVpxOtLCqJMj06ox/cMtha3tHVfuYn8MWvXnlx7CweuxHwh63iLRVwejcmuuW+7AohRGUC86x+qvyG/29uNoErFaxvxnqs1RXGImDP/3yg+R4DN1NyHn4R5JIJIqrSZUsIbLQ8= 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=sthD+b9q; arc=none smtp.client-ip=91.218.175.179 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="sthD+b9q" Date: Sat, 25 Jan 2025 01:25:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737768344; 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=KwT2PfcNm2ZOJaOk7v8Yc0w2B0zR2NQznrVcYeb0C6g=; b=sthD+b9qbQ6ArrFYLQ9WBZDPk1WIZzbEZlS2Tg3mCmxwq/EzdaFCZSRr4ckQj6xT522qm6 ROl+XT3XwgQ842YGgTu0IG7Px4nMHBN7XPNpWgfr9jRcaONWKKhacX7HlL8lv1w1Vezvw1 RtJ2/bul6aGeiu0tXHNroqbqnBQkSh0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , Shakeel Butt , Muchun Song , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: memcontrol: move memsw charge callbacks to v1 Message-ID: References: <20250124054132.45643-1-hannes@cmpxchg.org> 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: <20250124054132.45643-1-hannes@cmpxchg.org> X-Migadu-Flow: FLOW_OUT On Fri, Jan 24, 2025 at 12:41:32AM -0500, Johannes Weiner wrote: > The interweaving of two entirely different swap accounting strategies > has been one of the more confusing parts of the memcg code. Split out > the v1 code to clarify the implementation and a handful of callsites, > and to avoid building the v1 bits when !CONFIG_MEMCG_V1. > > text data bss dec hex filename > 39253 6446 4160 49859 c2c3 mm/memcontrol.o.old > 38877 6382 4160 49419 c10b mm/memcontrol.o Nice! > > Signed-off-by: Johannes Weiner > --- > include/linux/memcontrol.h | 17 +++-- > include/linux/swap.h | 5 -- > mm/huge_memory.c | 2 +- > mm/memcontrol-v1.c | 89 ++++++++++++++++++++++++- > mm/memcontrol-v1.h | 6 +- > mm/memcontrol.c | 129 ++++++------------------------------- Acked-by: Roman Gushchin Thanks