From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.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 0ADAF42EECE for ; Wed, 17 Jun 2026 14:18:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781705899; cv=none; b=G4t1HtUc7U2t3e3apM3dFDHadpdyqc3U49FwmagPobUQ0lfnsxloO+19zi4RqrwHIHf3bgM5WnP33kSbpQ/wpGipxzXTN8vN7bGW6xsgehS+adZL0KK/NvR9si+HxTrBql+9O2BcV+eFXWI3sb2fZ0G438jy0+YwlVnHR8epGpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781705899; c=relaxed/simple; bh=WHIjWC5ozPZyVPh6RzHlV/WOMQlM+Vnvv7J0ZkBt8Gk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YpOmHFQQsP4nnSVKcMiDS/TvVMwMEAFekkybOGMaRXsKeSihCnh75rxiv4IvUUDroVSWPAxKzqX25xGW4qRGlSrCdnYpcvM9xqF55CtPFWNdeG2i3VfeHhMUneZr8cClWhxAcWMuJ3rcmZvks1lySjke+Mh9jCNRkW6i5J9VGTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=QQJs8zG4; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="QQJs8zG4" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-4624a44e152so877207f8f.2 for ; Wed, 17 Jun 2026 07:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1781705896; x=1782310696; 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=WHIjWC5ozPZyVPh6RzHlV/WOMQlM+Vnvv7J0ZkBt8Gk=; b=QQJs8zG4Tt1Ie2XtxSgVOeEqDFj5LSLBYg3/BJHKh/dyNvnFFLHz/+niH+e2cVKv/u aolZEBenidIWDZIsatXDfQ94jydUjqwk6lnrjO4t67pSW9d8GeGatUKQuLwro2mbk61O 6Ib9H/imGHacnI0V1upp1Esqg6InsfHKaT4KuE2VmhXnJQQYMiebw/T47qqJKQxj2ZHW slHYkqjZLtjImn4fRqC5Fda6vJCKyMVbZVzYoGeFGQOG//H6tWavgCzE/cYlwVz3/5WK cx0+btiRImfOY5Sb7rUwU/umMzbDRMRTZGUZ3eXp9EkgffyNFEKbFS8SukAM4X+sHRHD XI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781705896; x=1782310696; 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=WHIjWC5ozPZyVPh6RzHlV/WOMQlM+Vnvv7J0ZkBt8Gk=; b=cFNtnOYX/vUGN2hBo2PY3eRS1W0kM7H5amlGX7acvbDhRyCe67WI98VoFXK1vnf9FQ zKeyWMv1dmIo/GQ90/DlTJCCdoNKyuQUTwXJEA6kIh0gA+Vyex6bW/8t1UWDk59y3Llu Sd0OBz64Ur5yeZ+L6xTE28dNX676/xVj8/tWKgHuungUBwwNEUijJOK1jF7ApJ2hDWAt y4gk4nPW4dvpYK7auTiR4rbjg6M+fEOLWVN0CHofipy5cyg+wGe4GmxQrD0HGOAXcA4a nvtO1qqNIp1M/QfNYX5uGnLz9imELGudZLxEGS3EqbmHgcODpLTT8AFuItSUOZ/vSKJN o9tg== X-Forwarded-Encrypted: i=1; AFNElJ+GDwGlxx+2WDe+zqzYVY4BhyFwak0hrpdW/3UJDdeKMcG5TLKIhRGdogQucVcyPqHAIVGMFp90vytl+8g=@vger.kernel.org X-Gm-Message-State: AOJu0YyASYpND/YF/Ov9YmM48D493/JDPBhUUIqHbx70u6+oCVyfOxNK MUFLkE67WKu82HTOxubWQVWhD6EkkQp9n/GXYax9iVDtNWVctELClBJy7lTOtnNITJI= X-Gm-Gg: Acq92OEF0xd2J0jPBuaNKb47FM/tjVeYQKeEMhPf4dgZOP56b23N6UP+2W5LiisEH2I lv32sov7K/oVdJuSGRzhUGJsz4wndengJWPG+UjWcu9mxBFd9kn2zG+aXrxrrG2Qaw11HTnvmxu UUh6GiiUuE5fq4gPpmzb5yFLCKCAzh4QTp3Wsdat3EM3O+xjeGLsdbdbN0e8Hyak7Bxc3QsgXG2 jyIlIaT5XExRMfSyCsbM4eqJggVjMGC78m1dqcnPHWBPKkumCFKkgbUJZ7DjPAKtKhHcyWAUKI/ nGhbo1I+0orKu+O4RFAfV/AkGOYoMapSTtBW8XJPwTvMh+Y+kxdyDrGr6eio80iYe0AoA2IPStB Eg3Nd/ORgfxTrMY7LliwVaHxqwGs404U48CS2ExonCKx5PKdqTSVBGOy1TjZa24o/c4lNuFPE/Q qkecNW0sfGXNTYsxlm9hfLRn+2/ILcKIhfUI+xL2NGdXFo09dxF47barSYmJOmVvH+wswhddASE j8eqmnjqJMRvoo= X-Received: by 2002:a05:600c:a142:b0:490:b8d3:5dcc with SMTP id 5b1f17b1804b1-492333ca3b7mr55578185e9.19.1781705896184; Wed, 17 Jun 2026 07:18:16 -0700 (PDT) Received: from localhost (p200300f65f47db043b42891e8adbe9a5.dip0.t-ipconnect.de. [2003:f6:5f47:db04:3b42:891e:8adb:e9a5]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-49230a4f8d7sm161306245e9.5.2026.06.17.07.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2026 07:18:15 -0700 (PDT) Date: Wed, 17 Jun 2026 16:18:14 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Heiko Carstens Cc: Frederic Weisbecker , Peter Zijlstra , Thomas Gleixner , Alexander Gordeev , Sven Schnelle , Vasily Gorbik , Christian Borntraeger , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 3/4] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait() Message-ID: References: <20260513140129.4100822-1-hca@linux.ibm.com> <20260513140129.4100822-4-hca@linux.ibm.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="zk3crrqd7auhigwn" Content-Disposition: inline In-Reply-To: <20260513140129.4100822-4-hca@linux.ibm.com> --zk3crrqd7auhigwn Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 3/4] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait() MIME-Version: 1.0 Hello, On Wed, May 13, 2026 at 04:01:28PM +0200, Heiko Carstens wrote: > The former s390 specific arch_cpu_idle_time() implementation was > removed, since its implementation was racy and reported idle time > could go backwards [1]. >=20 > However this removal was not necessary, since independently of the s390 > architecture specific races there exists the iowait counter update race, > which can also lead to reported idle time going backwards [2]. >=20 > With Frederic Weisbecker's recent cpu idle time accounting refactoring > kernel_cpustat got a sequence counter. Use this to implement s390 specific > variants of kcpustat_field_idle() and kcpustat_field_iowait(). This is > logically a revert of [1] and moves cpu idle time accounting back into s3= 90 > architecture code, which is also more precise than the dyntick idle time > accounting by nohz/scheduler. >=20 > For comparing cross cpu time stamps it is necessary to use the stcke > instead of the stckf instruction in irq entry path. Furthermore this > open-codes a sequence lock in assembler and C code, which is required to > update the irq entry time stamp to the per cpu idle_data structure in a > race free manner. >=20 > [1] commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corr= esponding code") > [2] commit ead70b752373 ("timers/nohz: Add a comment about broken iowait = counter update race") >=20 > Signed-off-by: Heiko Carstens This patch became 670e057744e0cc8047bf96d15d18c46e16ae2e93 and is included in next-20260616. s390 allmodconfig fails to build with: ERROR: modpost: "arch_kcpustat_field_idle" [drivers/leds/trigger/ledtrig-ac= tivity.ko] undefined! ERROR: modpost: "arch_kcpustat_field_iowait" [drivers/leds/trigger/ledtrig-= activity.ko] undefined! Best regards Uwe --zk3crrqd7auhigwn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmoyrKMACgkQj4D7WH0S /k43bwf/QzXmrb/duiKGtFmbklmC98PTRIaw7K7Y5X1bV8n8FAn1ePG8mSd8/Pum YUlXK2v7C2RmWoAmQo71tlu+6hpAaflWmHAsx0LRcMomfh5lB4A/0Xi/5EMbnow9 EnV82YxGFjys12dkxNvnHWkHNmbLzJ9aB+z+V3WReL1m2BW5kuf2nwJeZK1Unzgy NXNNT/KfkXGGrIkKSXC4ksqfVQynI+1HU8C4U3+pJGhiO5pSKcqswdWyEMs0Zosq KUC7UnB0eKhczrmKRteTc3SH1794+FjJW+VFwesspt+plQ1Gw+1XVJzR3RchZ/IX 4mZxe1/1C/dW0xI4oIMYYAngpcFZoQ== =QK6n -----END PGP SIGNATURE----- --zk3crrqd7auhigwn--