Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp365385lqg; Thu, 11 Apr 2024 05:42:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCocEsgCN4F57iNZM5AaAYA8DdOYLj6s7F3Ktr5niBkN93lvwRKoDTLV9OopzHqNZjyH9RSX5VNFLQlXG+plCwII673AtqidzT0JhBMg== X-Google-Smtp-Source: AGHT+IFtkn/+NxJpP9Ohj7/goVUDoXoUcVybOoToR/h59YxkH4qLYwoAvN2l841RpgiJ9Kf3ATk8 X-Received: by 2002:a17:906:2446:b0:a52:1e53:febf with SMTP id a6-20020a170906244600b00a521e53febfmr1300216ejb.69.1712839333995; Thu, 11 Apr 2024 05:42:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712839333; cv=pass; d=google.com; s=arc-20160816; b=aUv5voCG//ZwvHTivlmXDbeenav5wO7tlKiWrl20NDYfmigrJvweiO2VPGxfexmmtL JdawTiQWM53dskg93I1i11XEf3kEuOTHQzbrO/EsS2D1Fzq0ctueSvsWx+Am/6IQrzqT /z3jRZf0o7ao840V4uC6gkYi5wmIROxkfpPHmRDZTfm2oPTwbsDfIaaemTRR7G7UOZwY mbNYiOyFOHvZXXzx7p64Db11/sEheZHbmdXV6D2SBkE2WU6N4tuqyzj2e1C+PEu3tqkW dHjszHKY0zEZluUYEMwwgow5TL/wbvWPdMAq/P1TiqQJwD2EdMCESTGLojgs++bZLfsy eNUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BeD2tLXhJDCp8Hd+iLB4/ol9hRgR96ICz3aVnm76G4E=; fh=fmJAQNqzv5Vyv75RDDlN7CK/avNDzxUCRrx53jU3DTg=; b=nr6JFjnOZ3SLZraSSe9/CKMxiWyvOpg9P9xe8qpvadGicGM8ouaIf+DiGpiq1qwARU hCTkp4mkhhTqX4BIFNCXU04jQiYwJKw6qa6gpJfijXzX7Mf0pKYow39oEorikoj9h6Bd Okk1IhW6EJgJmifCC+X6Lw4lSNcRqCuqjdId3dQ0SOH72QAE2f/R6lBbVKsCx7EDHqIc DwaSj2/n2sp1VB7dmG/vR8+7ZAhdAlW30p5PwZ9wH5RtRJ576/pgy2vhjbaQyRnJE1t3 +c3cH8Ui3ltEiyK9M0U74T8lAq7kTRV7tv3KBkJfYVryvpgtUqdJZ/tyrnXLaXfBsub6 C8Ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VRFRu4LM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140450-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ld10-20020a170906f94a00b00a4a37082313si697665ejb.700.2024.04.11.05.42.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 05:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140450-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=@kernel.org header.s=k20201202 header.b=VRFRu4LM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140450-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 B81071F23C18 for ; Thu, 11 Apr 2024 12:42:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F65C383A5; Thu, 11 Apr 2024 12:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VRFRu4LM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A4BA11EA7D; Thu, 11 Apr 2024 12:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712839326; cv=none; b=g9FYIDgmX6aCD74LFnVX4NEMbQyksBXxS4/50KRcjrz6VG0jM23rAEgzYFB7HTNnvegK+gVRGCmmtKwjISskZTeEWZ4XKIdWp3uessBFG6M50yUjDo8mjKbxZUc305IYKVsyiXU5dysr1ufg69sRd+m0qxh06j9E1v2saWo3Kl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712839326; c=relaxed/simple; bh=PxTp+fmSvnK/+mwcHlID3Kvo0O7S7lNkjkYYM7rv7bY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QvoKlfTcGYkwPx4J/i5Q5EaD9KLUql24/qHX8Nhfy6MesOQ2YMTjJnJkh8MXZjIAYR3AxlhC6LV35j4tRfsErtuCOjAMsNcBoA9hcBJb72IPg0Bdgo8kgWq7mhn70oMCNLY3DhQWYTQJJOmQ+ja60vGfUym2yg/LhO1MRddZl0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VRFRu4LM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9039C433C7; Thu, 11 Apr 2024 12:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712839326; bh=PxTp+fmSvnK/+mwcHlID3Kvo0O7S7lNkjkYYM7rv7bY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VRFRu4LMSAcDcIV/Zn5qo6j1KR0AjcaZC/E48Yv2LdLv1JLDJgIA6CPMmCC2B9WVK +JxX1LFJOG9lf53HU44Dp+VCqoGW+9nmp50VUY49aTi+IzSRtstEvaoxLSpR0AswgF Bp7+m/bhrpFE9IfpPs8OO2JrRFlKUswlN/Q6cDB+a6mtfQcbuqZgRAiO0H4KAO+MGh h1nvrkubyJ/Dqd0jOCAa8Rk7ZcSC8O6X/lfdLEhDvKUHWI7DfoFs/HJ1Me+erh7uKO 8700e1u7b0Eod5ljxJT/+2QN6mpalo9oqWw8fMzIA2ATMD6mdCYlTOx37Cy+Jyt2ry i324Or5q88Jjg== Date: Thu, 11 Apr 2024 13:41:59 +0100 From: Mark Brown To: Oleg Nesterov Cc: Thomas Gleixner , John Stultz , Marco Elver , Peter Zijlstra , Ingo Molnar , "Eric W. Biederman" , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Dmitry Vyukov , kasan-dev@googlegroups.com, Edward Liaw , Carlos Llamas , Greg Kroah-Hartman Subject: Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution() Message-ID: References: <87sf02bgez.ffs@tglx> <87r0fmbe65.ffs@tglx> <87o7aqb6uw.ffs@tglx> <87frw2axv0.ffs@tglx> <20240404145408.GD7153@redhat.com> <87le5t9f14.ffs@tglx> <20240406150950.GA3060@redhat.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="dyKDlGTPSGYPjOVd" Content-Disposition: inline In-Reply-To: <20240406150950.GA3060@redhat.com> X-Cookie: Elliptic paraboloids for sale. --dyKDlGTPSGYPjOVd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 06, 2024 at 05:09:51PM +0200, Oleg Nesterov wrote: > Thomas says: >=20 > The signal distribution test has a tendency to hang for a long > time as the signal delivery is not really evenly distributed. In > fact it might never be distributed across all threads ever in > the way it is written. >=20 > To me even the >=20 > This primarily tests that the kernel does not favour any one. >=20 > comment doesn't look right. The kernel does favour a thread which hits > the timer interrupt when CLOCK_PROCESS_CPUTIME_ID expires. >=20 > The new version simply checks that the group leader sleeping in join() > never receives SIGALRM, cpu_timer_fire() should always send the signal > to the thread which burns cpu. >=20 > Without the commit bcb7ee79029d ("posix-timers: Prefer delivery of signals > to the current thread") the test-case fails immediately, the very 1st tick > wakes the leader up. Otherwise it quickly succeeds after 100 ticks. This has landed in -next and is causing warning spam throughout kselftest when built with clang: /home/broonie/git/bisect/tools/testing/selftests/kselftest.h:435:6: warning= : variable 'major' is used uninitialized whenever '||' condition is true [-= Wsometimes-uninitialized] if (uname(&info) || sscanf(info.release, "%u.%u.", &major, &minor) = !=3D 2) ^~~~~~~~~~~~ /home/broonie/git/bisect/tools/testing/selftests/kselftest.h:438:9: note: u= ninitialized use occurs here return major > min_major || (major =3D=3D min_major && minor >=3D m= in_minor); ^~~~~ /home/broonie/git/bisect/tools/testing/selftests/kselftest.h:435:6: note: r= emove the '||' if its condition is always false if (uname(&info) || sscanf(info.release, "%u.%u.", &major, &minor) = !=3D 2) ^~~~~~~~~~~~~~~ /home/broonie/git/bisect/tools/testing/selftests/kselftest.h:432:20: note: = initialize the variable 'major' to silence this warning unsigned int major, minor; ^ =3D 0 --dyKDlGTPSGYPjOVd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmYX2pcACgkQJNaLcl1U h9BWSAf8Ce2hIytHCkF6x1UmNuIwLSR+DyWc98yv65Jm8C0/yq8fOxHApvkBkoJD TPfPTSw/my83GMGiSkXAyoMcRuK6C5MS6Nnr74SPv8y6sweoXDEr2lQ8MSr3m08e HSE21HDCyG/zXhs00vukeR55ffNA7VGDB3BFoogyVDtILTpYgjz5xoJeFCyRQ6Kn P/QpL4Ig57dAWqYfCk3ya6OFpwNN2GFeBV6OL8Lmxa4EXXHqJY0S9Zkn8Rg9oISf qisPgNrW2RZ9xGHlRKAw4/g2Rqu5NHSUXQ3zhf7nK3m34MU2CccG2400FyF/X9u3 JO2v7g6vTGB3SDPcCJhahFtF76LMgA== =8Eym -----END PGP SIGNATURE----- --dyKDlGTPSGYPjOVd--