Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp343499lqp; Wed, 12 Jun 2024 03:21:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmbwfOmwuKVUW6WK+g6AezUGMlw44JeZw0tvKTLDT6k4vA4ubeiNsF5942H/8Ajy5A8p/60WzwX0CMfmGhj0mYe0cpcW35zKIDNGIwHQ== X-Google-Smtp-Source: AGHT+IG7whW1NHin+uGhO9A0TGOlCery6/X4THw4sQ89eELGwX4y7r4MSy1ZU40Feo090ik3vBar X-Received: by 2002:a17:906:350c:b0:a6f:3135:e2ce with SMTP id a640c23a62f3a-a6f4800b15cmr77955466b.68.1718187664926; Wed, 12 Jun 2024 03:21:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718187664; cv=pass; d=google.com; s=arc-20160816; b=iYSls7ExwCsu4E0Xu9aVWzZgUdqXCTVoYiEazHOnyqSivzGD5r/qzpdCCp/ps4zvRm cq9EwG16M6ox8ZG+SrELmqp3GbqXWJB7N5d92n6TZJ/Nue/RzmpfAzFqAXQvaJT6owEh Buzg4KcB9wSTRWYTX60zc3kKDFWhqi1CuUqDPIVy95Ydmr/ELjoFcG9Ar3dD7/WnGa6K SqBIArh5Fcb9xEf5zRq9Bbtbva0R5M3MfgBRGPKdv6Nc5ceJspTiQBG6aDoFCkJCHmJ4 QL+OvPjmIF8yW/I1CLdS8dCbwZjjU4N71+yiVhzvpqIyYga/ONyehsjc9JTSBgRF5Fe7 Sz4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=rAVclXOSQHliTbsOcE+ZdvLdxoXr1ZKxsFl95sESZiA=; fh=MqRDa1AczCsHqvz8jc9g7+4Vc3meYdeSdTCZdAlAbjQ=; b=IMO96CPfWFTH4AJh8X4J89qIWVC/Zro5SGL+ZvxbKD0+qQWZ/nv9EFECm6f3PecGoN 9ykLSvcJLf0dlhnPHFX6Tevk1/nCgQd/0FRqJwfNwrAcMukDcoVhTEEomSa2tVxTnnK+ igybq0cRbABV1zus+0kbLpGH2Pv14+LhdOprSsK9j+eW5fzBUHVEKfYXs3c3QHHer24l dksQRMwJ0XJArZQbp3xTqNoezEnVPsf5xuNGro34B2y2iAT0S7v1aaatSlJzfczp6pTs 05Ps6xc9z5Lfw9I4VwyQFVIRtTZxakjdXsUBU5AQaPw27f46XsluBZkGB4oU4d5FAbU0 t8BQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=XdJT8XQI; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-211343-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f1e0d07casi320892066b.211.2024.06.12.03.21.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211343-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=@ionos.com header.s=google header.b=XdJT8XQI; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-211343-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com 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 877391F229A7 for ; Wed, 12 Jun 2024 10:21:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49DDF16EBE7; Wed, 12 Jun 2024 10:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="XdJT8XQI" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.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 99F3033FE for ; Wed, 12 Jun 2024 10:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718187634; cv=none; b=Y8aT9vh7PT5eujzThyytr9bwIlpoGR8mQC+8ojL2sbhBLu5rwSMn2l5b7EJKETF4of16SyPHHhtCaCPp/gr+rgadEkzujdy9spBDlV/62y84jMheXhzwr6UordyygR7iDxAfPzCpIZh2Aasy8ewXwxNPSWfLLK9v+evahxwtpXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718187634; c=relaxed/simple; bh=rAVclXOSQHliTbsOcE+ZdvLdxoXr1ZKxsFl95sESZiA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FYUCBCCyZqjoaBTMIKOos31qtpWqJCzYRbT3WjnzFKGxezGPChiUwDbOZQdXZtqlneZDaisaKZG8L42FDHmrstqmtOZ+foCBmoAbxhhjj8dBIYr4FSMIGRAlX0zv7xwctjeNQzX35LFv4bFVLohRbC4cI+GFbWgNeHMH/Pdg1y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=XdJT8XQI; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so763801166b.1 for ; Wed, 12 Jun 2024 03:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1718187630; x=1718792430; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rAVclXOSQHliTbsOcE+ZdvLdxoXr1ZKxsFl95sESZiA=; b=XdJT8XQIDbIwY5Ls+AFh9FcQW6kqdvq9EnbIvOUdPGBadA/rl+EpWJowYlWR3nAPwz ykOG8648plsK/d++Q45//M98oay01LaewClnHVxxJMREeSKz5450bZi3Vhj0A8IaXTQQ nHjmZuUY9VvR9tz3hiPokMUf6dsLeNKsNxVFDJ1aGpZmYrCwQrCQJJrAR2FaL6GzcgNR Zh69K/qQEmKAgfjeTcAPhN5C7dU6FzlOtWrxDG0omxXbuDN5hcOYy8v6AWgpsBxVFzkI +QL/CP0GOejCtvzTwFYTJazzBtY+F0JoKo70deK/CkhOLwwCCRS3S5ogXp2O7klrRV/b t5Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718187630; x=1718792430; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rAVclXOSQHliTbsOcE+ZdvLdxoXr1ZKxsFl95sESZiA=; b=kqB0jA5opyMcdd/NoX0cb4oEt5k8gSFdXnDSITT+7O4E+rtbEvHD2/zvK8i7W/mZV5 z9+0AUma5oeObClFpGWIvKBF0MUHWSboPU2ouMhhiEeqM78MQhQlPpZVgxD6DH4/Mz5O g39MPVmDeaVzrx5m9WoerFAriSmSl2I9EHTLAtOO2rWW0p9Hs8Hfoi4Wg5dFol/8jzGW jjiYMmxEIFFyjEusd0FywUjNXRe8W5SLNPi/Zviw8FEjbfjQ6kDz9bWQ//ybKhdPHMuw 4ZSZs87fP+KIFeSmaYLKRz5U968ikSOAH644GvxEYOyQGYweRsmr/7318CpaysDCk0I9 pXnQ== X-Forwarded-Encrypted: i=1; AJvYcCVdZIp4vY/VbMStQ7MKX0uqnS8h5KNE6dB1zbwCaIa+4BS1cd2CZ8Eug/cXGzfkg5kszM+0JmN6RWaTgGcGE26YQSKCKl1ltqhBl+n8 X-Gm-Message-State: AOJu0Ywg9wkX+DI5/NoHgi/1tRG/NvTUL0/OwRUHyKTSoDMrgzLWLCbA oqcoXz/TbSidyjKcDn33akcYFs5FiYdVKdCLvx4kU9tatGwfVPGbalWGh05lBzWH3NsZf3nS9XQ dAUuU/v45oBRP2C98SytOdsgg2/w12SuJ6V2W80Dj2SWS1DuCy7A= X-Received: by 2002:a17:907:7e96:b0:a6f:3395:5d20 with SMTP id a640c23a62f3a-a6f47f71a37mr101609066b.37.1718187629717; Wed, 12 Jun 2024 03:20:29 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240612094856.GV40213@noisy.programming.kicks-ass.net> In-Reply-To: <20240612094856.GV40213@noisy.programming.kicks-ass.net> From: Max Kellermann Date: Wed, 12 Jun 2024 12:20:18 +0200 Message-ID: Subject: Re: Bad psi_group_cpu.tasks[NR_MEMSTALL] counter To: Peter Zijlstra Cc: Suren Baghdasaryan , Johannes Weiner , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 12, 2024 at 11:49=E2=80=AFAM Peter Zijlstra wrote: > The erofs one is also not entirely obvious, but irrelevant if you're not = using > it... the below should make it a little more obvious, but what do I know. We do use erofs a lot, and I read that very function the other day - it is weird code with two loop levels plus continue and even goto; but I thought it was okay. psi_memstall_enter() is only ever called if bio!=3DNULL, and the function takes care to call psi_memstall_leave() when NULLing bio. Therefore I think your patch is not necessary (but adds a tiny bit of overhead). What do I miss? > Best case would be if you could somehow find a reproducer, but > I realize this might be tricky. Oh, I wish. I tried for several days, adding artificial delays everywhere, in order to make some race more likely; I created and deleted millions of cgroups and killed just as many processes under (artificial) memory pressure, but nothing. Max