Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1220029lqo; Thu, 9 May 2024 07:57:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnAqoVN4Mj3tZb/DpiZiFseGI5cywO2BvJKCs5gm75mFPMt0csrFjcaRmw2vadTng4mrW+tV3myiqyrATi9D8njTOjS9dBOslEepsIBw== X-Google-Smtp-Source: AGHT+IHN6gBcrPz+IyHPXPaCKy3RVb8aJq/Ufvoyl5jm+ecOwJvTCW+psK6zHLtJgcPaEyKnGn/J X-Received: by 2002:a50:f605:0:b0:56b:ec47:a846 with SMTP id 4fb4d7f45d1cf-5731d9f0d33mr3441123a12.25.1715266669494; Thu, 09 May 2024 07:57:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715266669; cv=pass; d=google.com; s=arc-20160816; b=uIJots3eICivYg2gvfrT1BzBn3SWzDVHsXLQorHJRVHww2U3XCcEAjHRB2WhI9+mjN zmclji8VxOHN1b/PK0YJ5vLRVVxhJOuwRzSrsRbOQRtcFC+ExmnOZc7e7RqXzfmP9WME QVdfgCtUOlANoUpK9R7Jgl6HlZY29YHENZaVqRaGeCsyD2HS+RObXBRFhVwwo1u3KtFz ct6ZDPDxXe0yms5SpPAax4oe4J0ZrZIIp1hFEM/BeWVtfFYKU6F++DgZqCuSr3VxehYS oQ9uOJFFZbj9dDZNtFNq+c9Y2xSNUUJ7AppMEZhdR/h+tGUPQUAj3IzW4XoxO7T/YzGz 36dQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=4bqRwrBrqoa19SvEpE/J0OTW8kDuORQv0JaSXGHN1Ek=; fh=bl8rR7WDVUjSB6iJWklMJt9RrZny1h6/uysvwTiI9RM=; b=ePTNj7zjTcRnGOELNwpniXksgC5v8zD+ee9W/B1QAT6Kt9qG6BgD90QtDmR3ikvId3 F4z80RhqtSH9VjU3FTEV1Hy3b2xybLsOAbimtrGh5/BlwYntMp00wS/0nff666tCH5V/ xurwCpHamLn+vk7XkjFsPdrHPiWX692tDeCdo5Xx0lsw/SjE2E5OQNd1Iq72JQlQR+LY fgsdHXzsSQjgCEv5TxxLW/skXYHfskVrcq4+A+jn5lVV6amdka+wY3Y8xMeOtHAKU3A5 hPB/8o4WmCU7SgUJJfkFfAdDTeK9hvR5RukBM1mBFLR+Vzp3QVwIXcNesLG0BWNYpVAu Wl0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kxCQfYmg; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-174612-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733beacea8si825066a12.125.2024.05.09.07.57.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 07:57:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174612-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kxCQfYmg; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-174612-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3B1091F21E6D for ; Thu, 9 May 2024 14:57:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 879EA13A40B; Thu, 9 May 2024 14:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="kxCQfYmg" Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (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 C861A1A2C3A for ; Thu, 9 May 2024 14:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715266662; cv=none; b=pVOjCUMFPzPdAIR6CTZmlnFK3+/EdYzxRLZPtYqG+quQPWgyznKk+VY/CHYkBd6vcZ82B9KnEGnTwbpS7DcnpFP4jteCDaRTlBE0WoAU4gbsMxoLAbmdyJwoFz1NtnXfs9glgjJegD4MuByGdp3hniK69d/YubSaKwVTm7CgQq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715266662; c=relaxed/simple; bh=xsOrB5+mLW6wdrM4FaEOMLihm4F2cgax+VDPr4gVmdM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mhcUGy3y4KD1acMoQjQtpA3Pi4wyn5DkJ/B84QYFjZWXPT25ni5KY3VUC9a6pVWnrujxl4L0LAI7dnnCtWyYZXhq+Zc2wOvYKsQu7yZpYDoBIDVZ9t6szKXzVzKn6cdfo88KBjrZ7pjoU0JEgHodwd773IZHNrq5qnqnIp92Rgw= 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=kxCQfYmg; arc=none smtp.client-ip=91.218.175.177 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 Date: Thu, 9 May 2024 07:57:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715266656; 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=4bqRwrBrqoa19SvEpE/J0OTW8kDuORQv0JaSXGHN1Ek=; b=kxCQfYmgzEJJatutIe250OnBWlRlo3hl0rMFNu4PIDHKKj1dWF70b0tqtevbLXEA92GBTF RlfANb+akKXuenK3bTOYzQTSYYtt7Jx3KFZLa970lk8To8HJFzQoenTQITyUzc9yu1ZHZG oHraiU/TxtBzp5MZEMF7y5xFqg6Ey6Q= 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 , Muchun Song , Michal Hocko , Shakeel Butt , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH rfc 0/9] mm: memcg: separate legacy cgroup v1 code and put under config option Message-ID: References: <20240509034138.2207186-1-roman.gushchin@linux.dev> <20240509142205.GC374370@cmpxchg.org> <20240509143635.GD374370@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: <20240509143635.GD374370@cmpxchg.org> X-Migadu-Flow: FLOW_OUT On Thu, May 09, 2024 at 10:36:35AM -0400, Johannes Weiner wrote: > On Thu, May 09, 2024 at 10:22:10AM -0400, Johannes Weiner wrote: > > On Wed, May 08, 2024 at 08:41:29PM -0700, Roman Gushchin wrote: > > > 3) Is it better to use a new include/linux/memcontrol-v1.h instead of > > > mm/internal.h? Or mm/memcontrol-v1.h. > > > > mm/memcontrol-v1.h sounds good to me. > > Argh, there is a folio_memcg_lock() callsite in fs/buffer.c. I suppose > include/linux/memcontrol-v1.h makes the most sense then. You mean put everything into include/linux/memcontrol-v1.h? And functions from memcontrol.c by memcontrol-v1.c into include/linux/memcontrol.h? It's an option I considered it but the downside is that we're "leaking" a lot of internal definitions into the outside world, because memcontrol.h is included everywhere. So maybe mm/memcontrol-v1.h for definitions shared between v1 and v2 and keep exported functions in include/linux/memcontrol.h? There are only few of them. Thanks!