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 9BE5D426EDB for ; Mon, 29 Jun 2026 15:20:18 +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=1782746421; cv=none; b=OTUIq3148TiCPETAkibDFkC7v7IlAfp7sBPBSR3P3BZB/YsXuXsOvRAvicWkgyJOB16o74v6/dd7BfSL8pc0NQcXYIbEU6To9eTSMKcsJ4+prKU7wQHu8Vfd5virMjNsjqlD/aVo+S5LDCwMlPxWao0gvnm421kRM5yzenZakE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782746421; c=relaxed/simple; bh=unRc3onNkCmfhhWSGiY0T+F8juDSbMBSk+AXKKyOWQA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=T1aMF7liizA9WLENL8fM+R6H5C+iX3F/dhLQJ7Zg7oiUQYZLD3xZWIX33CzGQrNb8VHWtE+A1UiGXanoo5BCCRmZWPyYA8VRCX5Vmp+CmHCgOLLoeNxDiomoifcESIKJ8sMjvXL4+3a2UbSZBtrBxy1a5orVRP4jYHT8CVfzI/s= 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=JihvDOM2; 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="JihvDOM2" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782746416; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zY/GriVJLynATGzgCugUthPblhIxqMm9CgqWiWmlu5I=; b=JihvDOM2HtqiSQAfyZeXmqsiw/qMEe5kcK6/aBmqOQ6JiD1jy5K3slgNtD5PpIcF4EKrsU ntfMVLFqWweMVpB1fEd/I7/Jk9lThGT7CGs727xXTX2R5F6Ycwe7mTwad43arPQjvHRq1f +bm02FfrILjYkgEqnWaF183fFZKAtJM= Date: Mon, 29 Jun 2026 16:20:10 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 2/2] mm/vmpressure: split v1 userspace eventfd code into vmpressure-v1.c To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Andrew Morton , david@kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, tj@kernel.org, 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 References: <20260629130042.2649505-1-usama.arif@linux.dev> <20260629130042.2649505-3-usama.arif@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Usama Arif In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 29/06/2026 15:29, Michal Koutný wrote: > On Mon, Jun 29, 2026 at 02:55:57PM +0100, Usama Arif wrote: >> On 29/06/2026 14:34, Michal Koutný wrote: >>> On Mon, Jun 29, 2026 at 05:59:37AM -0700, Usama Arif wrote: >>>> This split is the first step toward eventually making vmpressure >>>> CONFIG_MEMCG_V1 only. The v2 in-kernel socket pressure path >>>> (tree=false) cannot be removed today immediately: PSI is not an >>>> exact replacement for vmpressure, and switching networking socket-buffer >>>> back-off to PSI >>> >>> (Here I understand PSI is a different and differntly scope metric) but >>> what does it mean when you write that tree=false cannot be removed but >>> the other patch bails out from vmpressure() (i.e. nothing is updated >>> anyway)? >> So the first patch bails out for cgroup v2 for tree = true only. >> For tree = false, it doesn't bail out, and is still used for networking >> socket-buffer back-off. I think that is a whole another scope of work >> switching to PSI. Hope that makes sense? > > I've mixed mutliple things together, sorry. I wanted to actually ask > about your response: > > | I realized when trying to swap the order that the splitting off v1 > | commit will end up doing more that what I think it should do (just > | splitting off v1 specific code), as the tree = true code will not get > | compiled in at all for cgroup v2, and it then ends up changing more > | behaviour. > > tree=true won't get compiled but v2 doesn't care about it, so the effect > of patch 2/2 should still be same (regardless whether it comes 1st or > 2nd). > Do you refer to the invocation of vmpressure_v1_account_tree() that is > affected by this? So what I mean is that I want to keep the effect of the patch that splits off v1 code as just that and not have the optimization of not running vmpressure for tree = true + cgroup v2. vmpressure_v1_account_tree() compiles to an empty function in the split patch for cgroup v2, so if we make the splitting out v1 code as the first patch, the commit is not just going to split v1 code but also do the optimization of not running tree = true cgroup v2. I hope it makes sense? > > Thanks, > Michal