From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 B1D9032B105 for ; Thu, 25 Jun 2026 09:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782378261; cv=none; b=LAJ6/BPzFJHRVosuB+O4g+ElTxwzpG6iTkS0fAkbC3r7aig+TkQp0mntspfNxfQ7gON14D3uC7oWdBzvI8HivnLEx2i7cOQMUdTvYv/j7aUTcNYJblH6AbwThbxna4dEl6uAXI7RFkXQcKXlIPutBXM0zWzvV8XbH62FvKSIAuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782378261; c=relaxed/simple; bh=uSqzgN+XcpqQTJrNp7HHot9/nwb67fYTOSh7GOCyU6U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VhO/W8QUGmZ9RLX6P3elnjb6MGUm1GAIstIDu57KvT9TR+1lLOMFEOQh+5Hkd+kgJsXQkBcxOiTMwvdMOj2oF1GU+zhhnBA0Dx3+78+1d9JkTS1cKqgRPkyD6aKEs9pLzBFCqUAe++vPAbntQGRJ5Pfxzhm6u4iDWViO47EaPRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=b7pm7LnM; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="b7pm7LnM" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-49249707788so10314105e9.2 for ; Thu, 25 Jun 2026 02:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782378258; x=1782983058; 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=qu0jrj9G0JVc5Jq1V99cgOHIlKcLZfL164YXQsqb4tM=; b=b7pm7LnMEGaGIWZ1/d5CjIx9OoKWSez+9GCh+j01BeDZdqD2hs82zlemLbw0wlKnbO al3/hW7OOXWJmcnqdU3OA17i0mcEDvnl00iOON4oIF1YMi0Y+1KmvKs/nV4aCysN59+O 0/8DBfyroYeTVNDgtCKtmUiAaWRKr+upqVtoufkLTlqOQT87BhjkvpKkPSfZupYFdtNr atLjEK2klbTCWcCbVCIPSx5INNC5TQ62XogP+dUfUNL6J1Wrl+XgxDXRrKeXSm5NnLzM 46LyBCtlYfdtg9HEGoHUjP2QzOwMMCa0MwoqNlAdOqBOogFRazaZY02+aAZPk0/kuFhN kt6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782378258; x=1782983058; 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=qu0jrj9G0JVc5Jq1V99cgOHIlKcLZfL164YXQsqb4tM=; b=i6y/0B5vnTJzw6vHVkW0ndCYuGcFcpE/7Y05F/PWD86k3+B6RQlgOsznrEWY2imj4s 4+EBCWHtaXCPAIc4e/+Cy49IKS2YOFs4TUWT0+Lt1hqc0EdjHjbkONuLleYBSYwJ2Z8D 2y5Fj1/Fl9kKylp2N1NBGpVoz0UJNSQlv7nNH3WekhWe/qzyTon5Q/3mLi58Gfta9Aj9 rDrZ0GAZxh+nzz0CAFYDHLCntu/hhMIwr7qkgkptJ0VZ3/RHa/Kd42R60C7NB2n+Xoiz HkL4jZayi74GEuYDwgJL8Bs3Ve81fwey7NbqKObrin8xrB8RPUWvjs96qP3+7sYYMRvX hoIg== X-Forwarded-Encrypted: i=1; AFNElJ+O6bCVZ4HYigdYjlI8arGoooQl71VqaMOpsFkoqvxnmgxuRXaTNjCAmX95jKg4QB8RipL8MdLPhAnep8w=@vger.kernel.org X-Gm-Message-State: AOJu0Yw16a994xZerPu36+qIR3kci0ySC/g+YhSm5iOijdK8NCN7THyu NRD9MCN/Qn2GgWnr4ICkjoLG43GM6tHW/gAk4tBvRdQnPmC9FYxwQzJQBrThw0mKocQ= X-Gm-Gg: AfdE7clPzM/bzS9l5lnDo6QP84MZBQVaUZgr7XEAkV4vOXaLHgPC7Mh7VjY13WCEsL1 mpCRiSP+GoJ5UXnylo//PlzV5nNCPeN2wVweAiEdSp+8SV2a9133IeZ2nQhAkXi8GFHUCqn1VFk laMT+VIHCvsl1DrRGZC0h/jL/j3ClJHqgDphGYZXB8ngjPc4kYCVNzOdhMzoeYCiK15PZJNGNN4 i2Qy6lv03AxoZ7Xpt/uZCdFherJ6PKKavUOlIEyASyWXzTBt4isgRwTwAHLolT5mvvcfJyTszvK YKWoNgLDzJrjU2M03OZ/jPtT+4R074r9L1uWZyoM6ROxl0JV66LtM5FwB2ukr88udL0yP/35UZI auSd6VVtJrQ4cSlWQhCsDR9eKr1ER/z+cT4FQjNNmAB0w6M8qMjoiB7+zWmsJZtAj/Diq3+1ZtK XqLz3Nbntorwvmy6p10IPRzdTxdQj5 X-Received: by 2002:a05:600c:3146:b0:490:b446:fb8 with SMTP id 5b1f17b1804b1-4926686df26mr17640625e9.11.1782378257843; Thu, 25 Jun 2026 02:04:17 -0700 (PDT) Received: from localhost.localdomain ([62.77.90.70]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-492660025a1sm29880925e9.0.2026.06.25.02.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 02:04:17 -0700 (PDT) Date: Thu, 25 Jun 2026 11:04:15 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Usama Arif 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 Subject: Re: [PATCH 1/2] mm/vmpressure: skip tree=true accounting on cgroup v2 Message-ID: References: <20260606114158.3126210-1-usama.arif@linux.dev> <20260606114158.3126210-2-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: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a3skirrhonq7dsal" Content-Disposition: inline In-Reply-To: <20260606114158.3126210-2-usama.arif@linux.dev> --a3skirrhonq7dsal Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 1/2] mm/vmpressure: skip tree=true accounting on cgroup v2 MIME-Version: 1.0 Hello Usama. On Sat, Jun 06, 2026 at 04:41:33AM -0700, Usama Arif = wrote: > --- a/mm/vmpressure.c > +++ b/mm/vmpressure.c > @@ -246,11 +246,13 @@ void vmpressure(gfp_t gfp, int order, struct mem_cg= roup *memcg, bool tree, > return; > =20 > /* > - * The in-kernel users only care about the reclaim efficiency > - * for this @memcg rather than the whole subtree, and there > - * isn't and won't be any in-kernel user in a legacy cgroup. > + * Only two combinations have a consumer: > + * cgroup v2 + tree=3Dfalse -> in-kernel socket pressure > + * cgroup v1 + tree=3Dtrue -> userspace eventfds (memory.pressure_le= vel) > + * Skip the other two: nothing consumes the result. This is a good finding, I had some troubles convincing myself that the v2 has really only the memcg->socket_pressure. I think swapping the order of the patches would make it easier to comprehend. Michal --a3skirrhonq7dsal Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCajzvCxsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+AjKBgEAyK2sPiCVRkReo0YiAqp1 DX6XbZ2mWl3yrlHdcIthi7UA/RIb0yL9zFWqFQwRyNJ5P5YdqY8GV9DOcfwugT+L T9sN =oRoJ -----END PGP SIGNATURE----- --a3skirrhonq7dsal--