From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.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 D1C5E496D3D for ; Mon, 12 Oct 2026 15:13:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791818017; cv=none; b=WGrRPYcWJOzfLi5HmCDYlwuKz8iAalGcVvWnrDEwVByO4SO5kz5qjaU503dEd0BQApFwizA6lxIqKu/LtUu8fX8gYSxXOqzPLz+VhrpOKiKNS+tCMzLzzSRLUELUsgY06R2T0//GqRaxGVaQgBLWsm2uaAJaIpY6FIHBqkzeSmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791818017; c=relaxed/simple; bh=umGqnCHZ555YbWy+AD6Im0/YlCEfdWkGC5Y0UR1kwVc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nGQurIonuzQkfhByg5d1mOH9bv/BnWKGaZ951eN6ihfyFUl0IxAV1Mjq6bscnRtdSH1qCSqyew37m77eyBNPo2ByOZBnPFalqqoAOoFbOnTBPyIeFeCvELKris8zP2dyOHmfAOAVyTMZmQtU94kNen8xchYJpxQYiunCRoA/6qw= 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=GiIsn1Lr; arc=none smtp.client-ip=209.85.221.48 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="GiIsn1Lr" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-48441a2ba1bso1158038f8f.1 for ; Mon, 12 Oct 2026 08:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1791818014; x=1792422814; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=0r5ZIRxJicrpwO18Ig2AHoe77ANyyN2+mXpKTZzO6Rs=; b=GiIsn1Lrp0cPDPfjeIYIyoWI8hYnEYJu1tkaNax7crpy4wRox2QAo3iM3f3odwD4lc YgMIbZKozdQc4e+JLl72zk1oGcSMnOWYbhWf5tUbJQ3Xptic2M45LM/btRJIZFJQ5dDW 78sAcnsi3H4dLkY3nAHDOFfs6Yf/4AH3E0vyN/nwkG8FT//uA5j7HR7ErtnqYtWxk/KH PrDvrak7mh7NUUy9RDuE+PK9YEJ7mVSWYWJv9HLyrYYQgSRNw5ycZJ1CjVUpisr+KlxR pu7Van4C/MnW20ZDwBzYe/p7l1GU8dhLbOEG9HyeFd26AM/DCGCnwN/IukUbeVbEBQbr 98eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791818014; x=1792422814; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=0r5ZIRxJicrpwO18Ig2AHoe77ANyyN2+mXpKTZzO6Rs=; b=NgkKKDelONltZ4R+Ml+0KTZTm9lkLx40BX1jOiLdzGN6J54RE4f99g7AzWoliFCnLO CWlCOXqfDjw9vF4hvd5goWOZAbJA+pFTgi81r1siicbpu6/cWgF1no/NgKhghUhAsMbd HVSPKYeaP3dcrjHD1aA5niBrOBuUJBh3w8uIPAhEq4bY0HfO0PUKBMFATnazFRKz2Ub6 gKRtYUGCKnwaofSXUcXVwYC+VHUty1uQupOxwab+XEdHHrffTp34alE29AUcuWIQ6ToJ WrnuoFA7wEJD1gVkduWlaR3SRlEcYEHEQcJRm63isZSYy5qlxE+FyuKFOj40NuMNUfxp MXPQ== X-Forwarded-Encrypted: i=1; AKwUvByvbhmyhA1BQIvml0xrfeOcFjhuAjciYrqH5+oA3hEyYslEhw3B75XfOWdrVzyC17Uo5p8c7ag2EWJ2KxI=@vger.kernel.org X-Gm-Message-State: AFq9FYKIkGNDQbzNq4fZorAtX3KrbVaqiXWsGcfDSUXtD6pEMoxvMzbK DoAmU3TsZHu/2v97bInvYWvROtIHUu2jTpI0A6h0F3V+xsxi6tIFwnLTvVtSXoDi1NM= X-Gm-Gg: AYBFou1SPzfUzZH07FCZH4di/q/R4umsXHJ09MW+pbqZVH6RDPA4DUYVkrm9zZLTaQK 8mW6xs7EAm59FUu4PAuE/Hq2hBYPkoypkec+15v2q2rhKdPqHiMQtBeFBcGCMC45uTxgvEXCIch 8MlAm7x/u3gD6BO6gFRbBdZL9bxMtEErHnMJSMntEkIOnOkht0rSSzQaZc4hTZGbC90fxGXiHBF bPVp1BebfcDtnm9Uz6RinH8XXfZADVK9bJvkP1nkndxDigNK7nQyLKjP7LJ+GiHCEle7UAYFV3L KKL/Y6kuWvcjkCZ8uAJIUfFYkMCC5UruuNwUDf0vKWBGiXhkTQfYICU1NXibCtJCpzCqBz5z483 5p8Z8nQqJpeLZVo+HjiRa3sy2Xl29fUxHD8rkl6SWJ+IORQgfo48k6n4Kvcr7br+DQ4cL1g8meL 4ap5H6c/JcGbyyCEzJ2L8AkG4SWONtY1BsAGrSVubFucrtaBViZwDvXCB7fO7LMFzX3Wiyc/tOa Q== X-Received: by 2002:a05:600c:3d96:b0:4a1:746e:5898 with SMTP id 5b1f17b1804b1-4a18e4835e7mr165297275e9.13.1791818013897; Mon, 12 Oct 2026 08:13:33 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a19f318c31sm78961655e9.3.2026.10.12.08.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2026 08:13:31 -0700 (PDT) Date: Mon, 12 Oct 2026 17:13:29 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Sebastian Chlad Cc: Tejun Heo , Johannes Weiner , Shuah Khan , Sebastian Chlad , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] selftests: cgroup: Report failed checks in test_memcontrol Message-ID: <20261012-blend-diner-c6361d00b9f1@there> References: <20260926055152.1684-1-sebastian.chlad@suse.com> 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="u5gbdmp2bzg3luyu" Content-Disposition: inline In-Reply-To: <20260926055152.1684-1-sebastian.chlad@suse.com> --u5gbdmp2bzg3luyu Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 0/2] selftests: cgroup: Report failed checks in test_memcontrol MIME-Version: 1.0 Hi Sebastian. On Sat, Sep 26, 2026 at 07:51:46AM +0200, Sebastian Chlad wrote: > test_memcontrol fails intermittently, but most of its checks fail > silently, so a "not ok" line gives no indication of how far off the > measured value was. This series makes those failures print the observed > and expected values. It does not change any threshold or pass/fail > behaviour. >=20 > Patch 1 converts the terminal tolerance checks to values_close_report(), > as was done for test_cpu in commit 4cdde87d723a ("selftests: cgroup: Use > values_close_report in test_cpu"). values_close() is kept where it is a > loop or retry condition, where a mismatch is expected. >=20 > Patch 2 reports the "memory.current < 50M" check in > alloc_pagecache_50M_check(). Because test_memcg_high() calls the same > helper expecting it to fail, it gets a quiet variant. An alternative > would be to pass the flag through the currently unused void *arg of > the cg_run() callback; I am happy to switch to that if preferred. >=20 > With patch 1 applied, we observe at times failures like these: >=20 > not ok 3 test_memcg_min > [FAIL] actual=3D18722816 expected=3D30408704 | diff=3D11685888 | limit= =3D7369725 | tolerance=3D15% | actual_error=3D23.78% >=20 > not ok 4 test_memcg_low > [FAIL] actual=3D20852736 expected=3D30408704 | diff=3D9555968 | limit= =3D7689210 | tolerance=3D15% | actual_error=3D18.64% >=20 > not ok 4 test_memcg_low > [FAIL] actual=3D14364672 expected=3D22020096 | diff=3D7655424 | limit= =3D7276940 | tolerance=3D20% | actual_error=3D21.04% >=20 > These are the child memory.current checks in test_memcg_protection() > (expected ~29M and ~21M). Their tolerances were already raised in commit > d2def68ae06a ("selftests: memcg: increase error tolerance of child > memory.current check in test_memcg_protection()"), and the values above > still fall outside them. In the first case the child is about 38% below > the expected 29M. This series only makes such failures visible; whether > the expectations or the tolerances should change is left for a separate > discussion. >=20 > Changes in v2: > - Patch 1: pass the measured value first in the alloc_anon_50M_check() > values_close_report() call, so that a failure prints actual and > expected the right way round (reported by Sashiko AI review). >=20 > v1: https://lore.kernel.org/all/20260926034923.31718-1-sebastian.chlad@su= se.com/ >=20 > Sebastian Chlad (2): > selftests: cgroup: Use values_close_report in test_memcontrol > selftests: cgroup: Report memory.current shortfall in > alloc_pagecache_50M_check >=20 > .../selftests/cgroup/test_memcontrol.c | 50 +++++++++++++------ > 1 file changed, 36 insertions(+), 14 deletions(-) AFAIU, the test is catching two types of errors: a) running under global pressure (preparations already fail), b) mismatches in expected values of protection tests (after preparation). I like the reporting of the latter -- with (only) that all consequent silent failures would imply^H strongly hint the error of type a), no? :-) Thanks, Michal --u5gbdmp2bzg3luyu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCasz5FRsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+AhGygEA+E0rmCsu6Ho27N1p5NB3 Lk11r2ujJozxMdTi3dbS1r0BAK1DXnSYhASHxLY7xCWsydP9u68Z2lTjRkyysntj W8gI =dP/j -----END PGP SIGNATURE----- --u5gbdmp2bzg3luyu--