Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp129153rdb; Mon, 22 Jan 2024 14:32:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOqrjLZcsHH4M61MCEMFRYOvVJFXhrofyj2gEY5kd97vLqFL3ncot3cpYFCPjnKwvEWP8/ X-Received: by 2002:a17:906:bf4c:b0:a30:a20e:c2a5 with SMTP id ps12-20020a170906bf4c00b00a30a20ec2a5mr362794ejb.94.1705962735667; Mon, 22 Jan 2024 14:32:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705962735; cv=pass; d=google.com; s=arc-20160816; b=wrSMf37RlT+bJUl0TbYyZdLGbR2ttN6YN0Xmw2vkVL5FNPxA0jVKwaiZJVlw4UMNx2 kx+Rm7dlvFOyFnuEKUycfmWwXGYY3gIh/mGDfJfvlnpsjYTW2xi2t7lnV0p19vSNEeMx U7TXn7ksyHxctlxiXrEfoDR/pXV3Lvrw1vtWfI/dwHTunu4tSDwgc2/D67n0P4au/nfD nnNhqV4+c+6eI4/mHM/2M78oU9R3y7EMrzbE4xGiU1RyJJ0eTPmabFkadM5AsDd6zqoz aObpANz8yx43jTbo7togYwTcR3kp9eN88EjZ85AaWxSjxlConXRsDzUgm4G1RkH+9Vc2 zAxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zfUgHz9YTGFHnM9e1mLf0w3zR/pkdFN5rEAIYADLZ/g=; fh=5bgbJPzvaSNSTkKrcHqiHALlqngUPwpCPGiEfyQweGM=; b=nZqE8OHrpbbb0y8zsFeaX/1CMuxVxe0PshWzqfB6XpiGHCY9/xvsxxGEWgI4V/2rpo jilYnxNJmhYZTG46KSK9qjgszueHPRxXAWRiIm0EZN97lnVXrEdwP3f6+kukxbCDpjnd yEGXQDU5vP9/4TFUTg66PZFg3/OWInErdJzGXiyo5DAa43jZfFQpxhMf8SJ06GHLojB+ 6y8R/t/17J2AbjgpIyBmsOpFPpNqqWB08RrMjYFG37gE19B1tFs5WMZIK364OXDsXCNq AyLUyzsxVQTrvlfy86TwK4PtgBlU+p3sY01RzeQj88wj//4FJ6aNpYB47x2A4E7WJBaE K2xA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qI9A/shm"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34237-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n26-20020a1709061d1a00b00a2d5d737b33si8292247ejh.932.2024.01.22.14.32.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 14:32:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34237-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=@kernel.org header.s=k20201202 header.b="qI9A/shm"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34237-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 A4AA11F265E5 for ; Mon, 22 Jan 2024 22:31:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 742C6FBE7; Mon, 22 Jan 2024 22:31:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qI9A/shm" 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 9866B15E94; Mon, 22 Jan 2024 22:31:33 +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=1705962693; cv=none; b=lnNoRUBbCLElkIgzuziuPv5MB2oJao4cq/Mn8ZnanHcM2EFMA/iYYN1TYwzs9jkFq6gQJO8DCCrwiiwUIL8oLZb6uwTTSkQAtzR4tWSBQ9zqYZ5OVp7tyRn3hCeYI46FSLETb3LWS+atPLlarVXdujFS5xrbhLubfxS4u3sQVao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705962693; c=relaxed/simple; bh=3JHtLyrtdIeR4lpdqLo4ZU4AipE0Puso/vddbxf5HZ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hwuje5gWsMHygu5AJdaezDL4u/7u8ayTveIpHsb4Y1aPztG7YzgBYxKkcFuut9SyoDnFk4whK11StcvZi3UnJ+fSskscF6dUktz/xwVjzaFvG3IPaVGC9I4cjSRpyeDY4LZTW1QeCjiYn2oAl1kh0ZtDRHsglFPjv6Sr1mBpMP4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qI9A/shm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A343BC433C7; Mon, 22 Jan 2024 22:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705962693; bh=3JHtLyrtdIeR4lpdqLo4ZU4AipE0Puso/vddbxf5HZ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qI9A/shmvVcKK9J87UeI9xEBdcU3a2OlzH3Oa171BAtNE19qHkRAMUUEayiO632Zx aH8yDOUkV64DHJTL8uqRLK/8ZVWO1B2NF0glxFNvQvbVFpi5IJWpwV56//WnwjwVa5 UnrB8I1Bidr6tBCbavofefh4qWZbQbEg5vLIdhktRevMgiHzmZn9mmwzndRIrCpT6J YbrHJ42W2RpqMgNxKdIPUqTDRQNDX2Jfwq3Cdiavg/+OfeTnUD/2fEZcSzRbo7mnWd py65TvhX2Khv1K21fmhi2ZPEGjBtUEOHUxi+emQ4hZ5mb5HDG8HW9jyQDQbMJujyoD B5mxBKAZ2ihrA== Date: Mon, 22 Jan 2024 23:31:30 +0100 From: Frederic Weisbecker To: Tim Chen Cc: Heiko Carstens , Thomas Gleixner , Ingo Molnar , Gerald Schaefer , Alexander Gordeev , Vasily Gorbik , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH] tick-sched: fix idle and iowait sleeptime accounting vs CPU hotplug Message-ID: References: <20240115163555.1004144-1-hca@linux.ibm.com> <0928660b39aea2828a79a87fef57447e657d43b4.camel@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0928660b39aea2828a79a87fef57447e657d43b4.camel@linux.intel.com> Le Mon, Jan 22, 2024 at 10:19:30AM -0800, Tim Chen a ?crit : > On Mon, 2024-01-15 at 17:35 +0100, Heiko Carstens wrote: > > > > > > + idle_sleeptime = ts->idle_sleeptime; > > + iowait_sleeptime = ts->iowait_sleeptime; > > memset(ts, 0, sizeof(*ts)); > > + ts->idle_sleeptime = idle_sleeptime; > > + ts->iowait_sleeptime = iowait_sleeptime; > > } > > Should idle_calls and idle_sleeps be preserved and > restored too? ? > > 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. I guess those can be saved as well. Would you like to send the patch? Thanks. > > Tim