Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp232903rdb; Mon, 22 Jan 2024 19:11:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQs4ozq9iWPys9QwM8DgbjXDlICXDqJxLzzTOOlo/QWx9syGVqaNpA9rgMj28DHIA9wiU6 X-Received: by 2002:a05:6402:28a4:b0:55c:2db1:ef8b with SMTP id eg36-20020a05640228a400b0055c2db1ef8bmr459076edb.1.1705979484555; Mon, 22 Jan 2024 19:11:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705979484; cv=pass; d=google.com; s=arc-20160816; b=fDcZCjyoc3m6M09Ymqwg9Tfa8JI8cL8MhWs12qZd9dvAazl1NK9b0X7mrddZovpCTG oR4YO6n95JP9cYT3yvw4pKC/YSVbyjv1f+yrpKprBpvS71bJ9i61bOAM2uHpTzrGOE3W 3fxSW9EfQH6Ef9IVK49gFs7+D129vCmRpRHKcrnz6krrfUaX00xAgdwHPM0kLEntQMge XD777VqoxDUW/R1CJbGQ8ZVA/KY+0izfFDg8kVteunw34poU9n0jOMGx7ayw7Iu3kKGn 9IGiVFco9s0M0bULWBnX75LLw1aNQHVALAlhM2YPkpPoGavc+W0jgiKUOypQRBA/qQl4 uVYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=/Q0ppjLER4YJpsl8drlvHrxiabu5IZGMF5HttacGl6I=; fh=i2jRmJXs3aBuxrzQoh37EwnpLVVJevaDhjayh0+Y9Q4=; b=k7rx8l4fLGzMZFzdDQNZPWZyv25zNzh+unuxFTe7wlWR2rdQ/aWIFE47XzK6KD7F4D ZP6t3Bz2j1OjxEZw0DlPqj3n7dlOFs1GEcp8EH4DlI7/SfGY9w8Uo0P692BfgbNzEa14 F+yv3PMKvQdasbFj2cugFY47qEgRAV1nPNJm9rDTnZY+1kgxMwrjclDsINdzYXciWvn8 oBFQq19XdY4ovQZPvIXHcE0UmrF/NkIZnyik2JD+y7tK2ti/Uk85nEChvEYgxT/sPerx XMrB3I74ziTI4rU+lFvcDoN4lGMH9wQW0hxfqFGeeag1Gk8y0I+/192oaSU6fPVYxKoX RYdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K7Gp1DGx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-34297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ez18-20020a056402451200b0055c20d5ffd8si2214008edb.401.2024.01.22.19.11.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 19:11:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K7Gp1DGx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-34297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 76D571F269D7 for ; Mon, 22 Jan 2024 23:33:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F2D04E1AD; Mon, 22 Jan 2024 23:33:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K7Gp1DGx" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 F30474D59A; Mon, 22 Jan 2024 23:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705966410; cv=none; b=YwGBhD8KS+bVfXLAlKwcZvPhu6evbaCsrprpire0k5AcF7fEBXfpQXiXue6hH2DkHd/UEwAe+ZQKLvHT5+si2sKpdug/dUb5p/0fHafcXTCJ5WpzZYMU2rheC4Cla9N0L1FnQlXcFTpIEGBiYc5X8pXRkRzaose4ncW3cYhbknI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705966410; c=relaxed/simple; bh=3ua4aeYsQyY22UzxCGBCdj5W+o+Q8xSEVa1JTmEzpJ4=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=KnHO0LCeVChoI8/njRxyMZo3ydUfm/bvjykWwhgQzLeyrpX+ELd2WkXyNH86vAr7+qsPFi73bojTkcYS6+yFTLOCTrcMAhiZKSgKrIznBsOoGeUV6MBEJgvYa3PSmjzkpQigTiKYl1NzLKRPFdkENfmW+rVj0uyLy5Q2JaVYxgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K7Gp1DGx; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705966409; x=1737502409; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=3ua4aeYsQyY22UzxCGBCdj5W+o+Q8xSEVa1JTmEzpJ4=; b=K7Gp1DGxNlD+ftKxFlxPdvLDnXv/SXb5SBvtgBPXbft9P7qwEvjN978c CYqO7b9fuB4CD56o5TwRIg6rclw8I9tJkeXRYSuZqVqH98mQ40ynuw+pG CN0DL0VGOIiii3Bd9A8fl/VXMsge2lW7RKTvJNAX3j+0o6tTsJcXh92TJ CRzcXoH6KuOJhgoGwXre6kj72LNNXLfAGWTGufyfD9SJs/0IqEspDFFDw e9jfnkZzw6QR5irYzchjstRWMC1C4hvhrb45b9vOIR/I3Lsx7hg5qgdZk NYwRUyLPjaRVBUzMQ3Y21Uu/Q44sizQNvAC0s6+m4jQj/a+M6Cb1gJwua g==; X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="8032317" X-IronPort-AV: E=Sophos;i="6.05,212,1701158400"; d="scan'208";a="8032317" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 15:33:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="1117040587" X-IronPort-AV: E=Sophos;i="6.05,212,1701158400"; d="scan'208";a="1117040587" Received: from ishandes-mobl1.amr.corp.intel.com (HELO [10.209.49.194]) ([10.209.49.194]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 15:33:27 -0800 Message-ID: Subject: Re: [PATCH] tick-sched: fix idle and iowait sleeptime accounting vs CPU hotplug From: Tim Chen To: Frederic Weisbecker Cc: Heiko Carstens , Thomas Gleixner , Ingo Molnar , Gerald Schaefer , Alexander Gordeev , Vasily Gorbik , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Date: Mon, 22 Jan 2024 15:33:27 -0800 In-Reply-To: References: <20240115163555.1004144-1-hca@linux.ibm.com> <0928660b39aea2828a79a87fef57447e657d43b4.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-01-22 at 23:31 +0100, Frederic Weisbecker wrote: > Le Mon, Jan 22, 2024 at 10:19:30AM -0800, Tim Chen a =C3=A9crit : > > On Mon, 2024-01-15 at 17:35 +0100, Heiko Carstens wrote: > > >=20 > > > =20 > > > + idle_sleeptime =3D ts->idle_sleeptime; > > > + iowait_sleeptime =3D ts->iowait_sleeptime; > > > memset(ts, 0, sizeof(*ts)); > > > + ts->idle_sleeptime =3D idle_sleeptime; > > > + ts->iowait_sleeptime =3D iowait_sleeptime; > > > } > >=20 > > Should idle_calls and idle_sleeps be preserved and > > restored too? =C2=A0 > >=20 > > Seems like if we preserve the > > idle_sleeptime, and wish to compute the average > > sleep time per sleep, we will need to know the value of > > idle_sleeps that's also preserved across CPU offline/online. >=20 > I guess those can be saved as well. Would you like to send the patch? >=20 Okay, sent the patch in a separate email. Tim