From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 052D035E956 for ; Mon, 29 Jun 2026 18:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782756766; cv=none; b=da4kgESKzYyhlAyZNjqWKld2T5mbIlPPJQq7HCYgMPYOUoI63ns39pb1hkfqorYnSOaS0AIZ276xc52z+rbuRfj7s8im7dIUWmpMS9DmuEGxDDycbjnFtiBK5N8hE/tgGneoGthWXYIrOQIPL61OsSa+q6IzOHkXA3YvP/D2Frw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782756766; c=relaxed/simple; bh=aet0WhTLjC5cSs8m39GyH7mBhjAPgET1zWsf4VBkrdk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eYAmJr93aqMKy7fvydBoD4O5KpyNfWrc57wlQ8DfCf0j587GTlvpkRVkR7zjxzOYC/1onMxbUImBSGFRD2BgfLDeGuRBoJXVolwmIC4AS0TIX8yTIwMeMkUj9w8D2MU3WfEnCNhkCy9eHzz5KWF/7PzU4I+QJL2kpJyq2LRysas= 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=alYYS309; arc=none smtp.client-ip=209.85.219.48 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="alYYS309" Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-8ee88fce572so20740916d6.1 for ; Mon, 29 Jun 2026 11:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1782756763; x=1783361563; 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=KkgSZTX5dgpJDd1Pw+Y21Lq+ktYzI2xthklt27JpA2c=; b=alYYS309m98H1aMxsCjg5+nLVC0C6rh78pMeFbm5ckh+ktuGfyH8rtvLT0L8UvqDUa 8qbcFJGFoptLT1gYFiB+/bJgsBuedDvOA13Hbe+IFmAVNNIz/eofU71B26SsNbChDwkN RC6RFxQ4BODlSzuvaVhNhZJYpIQmWltygInrI8EzB4L0uVuukIpfoW5spwxkcW1K2FDN WjHcwOUeeQaA2t3Z5taihozlfWcBWQNA3PlgYX1O5Ky6Jb48kasBUO4mIIMutGsSb+ft CD/qil4NC8ntSiDFdwNTucD0pQ8UyXcJ7VKwTL0JP4QfHA1DEw7ZGcYOKz70TghqthSN dBXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782756763; x=1783361563; 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=KkgSZTX5dgpJDd1Pw+Y21Lq+ktYzI2xthklt27JpA2c=; b=Ycnu06LoKR4P4vZBaSgZYswWK9UIBS1dYiV/kxEe4I0y9FykPNabtU/UMFiyMle3+S Vby/GNKue0KQB8oe41EVvSMrFoKpC2w+4Zl2Yxq9wDBkhVEU6fiFBhkhf74GXpr5S0SR lWq0NFXbkZAp8eKiIzRxt8Wg09WT2/OrKaHBH1bwYuVk624l9jIkzafEWVBeEOTFQsJi 3FMATPAqn+kkp+yW8+0rwlWW5+IyGhTPsXv6PYFK8qe08R1Xx/mhGARbUJgIdcapQyi2 Br6d8BxWlbeDew3f70KsmLOJtLLaB0FsRkp/G+nB0ZSMEgx+PaiLx8ZZTa7GA/yO4XZT dI/A== X-Forwarded-Encrypted: i=1; AHgh+RoD6w3mmkS/ZE8yjQloTUpOZmzs4T1l2HCdCU6D0jDH+PRrY6UDspQ7/D6m9rDtpBPgRdeQCF+lmITBC5I=@vger.kernel.org X-Gm-Message-State: AOJu0YyyngLWfmD5bFgyoBN2mAA9JkuV8XLevhvrNv8nGD6I+KPs0e2W jp6HmjXP7aNBceipbDY82WQCAoYXzDMlune12Phl9J7o18/jcPt2mmQqiWqJ2J0eH0c= X-Gm-Gg: AfdE7cnHjut9CcmcEnFSjxf5/YoeRcTyYL2qNPn45P8TsLNgzetvbr27iJS7ABymOqf HEpzajvU97FpAuKxXIkUGVMFRufvtR8mT77te7YgORj+AYgkZNY0K9pZVqE/njhQVAm/mGtDzsd qQ9DPn8FTk6CZuNZAGt+wGlPKQXY5l82IT9hzGdBNivklAfbfcm8tkwlMXaqZFJTqQNiTBweWfB Xq96IxpQr3ui+OcK2B2lghiL2a470gqVv+Uzsr7ziziKsHKTHoac/bOQsAa7jM9kojueWVTP9MY x4yLX2/nIZM7nQSyFRSgUbirUoVdxONvVkyFDtoWo69XxCWD1+FGMWNYKqoQlqWeQ/Secp2e2bW UpXpecBvaT907E1jPtALQy5iYsxtQLzBLPRRc9IgmG+lXLmCkgMWF+AZFMdGUUrB/AB/uiNjwd9 UX0CAGalSu+7M= X-Received: by 2002:a0c:f004:0:b0:8ef:1103:7f3 with SMTP id 6a1803df08f44-8f1bb8f4be6mr5715736d6.37.1782756762664; Mon, 29 Jun 2026 11:12:42 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8f1a69c2dfbsm3847966d6.30.2026.06.29.11.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 11:12:42 -0700 (PDT) Date: Mon, 29 Jun 2026 14:12:38 -0400 From: Johannes Weiner To: Usama Arif Cc: Andrew Morton , david@kernel.org, linux-mm@kvack.org, tj@kernel.org, mkoutny@suse.com, shakeel.butt@linux.dev, roman.gushchin@linux.dev, liam@infradead.org, linux-kernel@vger.kernel.org, ljs@kernel.org, mhocko@suse.com, rppt@kernel.org, surenb@google.com, vbabka@kernel.org, kernel-team@meta.com Subject: Re: [PATCH v2 2/2] mm/vmpressure: split v1 userspace eventfd code into vmpressure-v1.c Message-ID: References: <20260629130042.2649505-1-usama.arif@linux.dev> <20260629130042.2649505-3-usama.arif@linux.dev> 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: On Mon, Jun 29, 2026 at 06:23:58PM +0100, Usama Arif wrote: > > > On 29/06/2026 17:48, Johannes Weiner wrote: > > On Mon, Jun 29, 2026 at 05:59:37AM -0700, Usama Arif wrote: > >> @@ -101,7 +101,7 @@ obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o > >> obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o > >> obj-$(CONFIG_PAGE_COUNTER) += page_counter.o > >> obj-$(CONFIG_LIVEUPDATE_MEMFD) += memfd_luo.o > >> -obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o > >> +obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o vmpressure-v1.o > > > > Might as well move the interface part to memcontrol-v1.c instead of > > creating a new file. > > > > I think it would make it easier once we move cgroup v2 off of > vmpressure. Then we can rename vmpressure-v1.c to just vmpressure.c > and gate it to CONFIG_MEMCG_V1. The other option would be everything > living in memcontrol-v1.c? Hm? I just mean move whatever you move into that new vmpressure-v1.c into memcontrol-v1.c instead. > I think its nice to keep it separate as > memcontrol-v1.c is already 2K+ lines and this is standalone feature > that can sit in a separate file. It's all deprecated code with no active development. Containing it and making it easy to see the footprint of the cgroup1 option is the higher priority, more than maintaining neat component separation. No need to work it naturally into the file either - decls/variables up top, functions somewhere further down etc. Just paste it into one contiguous vmpressure block under memcg1_oom_finish(). That's how that file is already structured with the other components in there.