Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3786510rwb; Fri, 30 Sep 2022 08:17:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5RYU38ydUXN2U679fU5CTsklyFLWaNJZVWzcFdAanj5dzlI1/R2oC1letBZU0++WdtrfbR X-Received: by 2002:a50:cdc5:0:b0:458:97f3:b990 with SMTP id h5-20020a50cdc5000000b0045897f3b990mr1156093edj.197.1664551073709; Fri, 30 Sep 2022 08:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664551073; cv=none; d=google.com; s=arc-20160816; b=G0M0Dwg/Pzhb/odltEw/S9GrW0gztHwCpKn/CuN5NcqYIM0cZQ+qtzNIdAQ0CZ+IW1 Z+LjLunhU5vGIgHrCi+Q0hjc/jOkXdOtamTKgk+dTUqCtDqWnPL3RFDx3VHLGfxlL0+X Xd2vqVxH1cV33Lm1ZfT87bJDuFWZ0d50p8LDt1gMpomm+jxxTNExMfSAiqnsclFbE006 HeaNdl4vVZ6bRA2oB0nh30HgbCD8MKiIK5q3jERnrG/IDQKbW4iA+fyHB1ZHqPSdjwqk 4nQKTN3hoRRZATTd8YKT7evzwL3fZj6vlY3mWJG3fSH5ZUTguTCHnNmej7LdreisMrna Fa8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wTfVpK5bcpPVXNp7sQipvdGmPfmo2Uu8V455ufdPtGA=; b=D8hLIrwDqpIFc0lAI65KpvdknDVq7xwL2lXEjA5Bbct/pJzCnlEXIgKxzhjTjiIIrI nqTsWivTpjRk2wWTl7APzqYivp+tCFKvS6U8B/GfAs49zt/UqZe07FFG7HzJyimNyy8x cL9Y08baoH8Z62uSY11pWZHVL59FmZFjHcLwagsOElQbC+/c0WgC02b+W4lCq4XTEUgj /Vq/QzQC3VF9cj5hitb1WMrl3lE5+4BBKIuXtehOxc11rAje/H8xm63ybaBJ72X6KgMT gCRdOoT+s6NDh/noXlAKUtHl3l95g+Itgpl05L1R0FyptDg4wMiFNq694bmEl5pb4RDa 2vPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pyEzS7oW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a170906065600b00783afc3fa55si1676538ejb.283.2022.09.30.08.17.27; Fri, 30 Sep 2022 08:17:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pyEzS7oW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231768AbiI3Os3 (ORCPT + 99 others); Fri, 30 Sep 2022 10:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbiI3OsT (ORCPT ); Fri, 30 Sep 2022 10:48:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0242412F740 for ; Fri, 30 Sep 2022 07:48:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CF537B82911 for ; Fri, 30 Sep 2022 14:48:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7845BC433D6; Fri, 30 Sep 2022 14:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664549292; bh=0Ys9JqCkG+NZjXw6kDlC7Gep1cXzQ3AsfDlMdXiGJkE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=pyEzS7oWjoUT0vC3SOYpswsWEBWwBV7AcxFuYm4mwhlbnqbnnBb3PQ82xUpnRtqNP wd8RNKFQQaXR6QcYb1m/WjnNGvb8PYIvVauEASVJ3W8HeHg7X2VelcJu4BLoxP5Tdb pAtEB+hG/CE9NDDLDshwubnfNtjAjRBeINC/K38VBwV64w5sJ8YH+FUUfEiL2r4nUE UM3mrKQCthBF5Qhy6RAZrnBMfRLIKzOvUHf2Rfu1Y+pQbiG+64RPBA5T3wbwol5DHu EyoGlDVZRr3wLzwBizLQ/KJT5NuV7JttTyHzTOddDEW8xAA8TbGpU0PiHVKpMKOfOE BAMF9B5D+Q+pQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 1EBD55C05C2; Fri, 30 Sep 2022 07:48:12 -0700 (PDT) Date: Fri, 30 Sep 2022 07:48:12 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Joel Fernandes , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org, Boqun Feng , "Rafael J. Wysocki" Subject: Re: RCU vs NOHZ Message-ID: <20220930144812.GA1801669@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220916075817.GE246308@paulmck-ThinkPad-P17-Gen-1> <20220917142508.GF246308@paulmck-ThinkPad-P17-Gen-1> <20220929152044.GE4196@paulmck-ThinkPad-P17-Gen-1> <20220929163624.GN4196@paulmck-ThinkPad-P17-Gen-1> <20220929195641.GZ4196@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220929195641.GZ4196@paulmck-ThinkPad-P17-Gen-1> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 29, 2022 at 12:56:41PM -0700, Paul E. McKenney wrote: > On Thu, Sep 29, 2022 at 09:08:42PM +0200, Peter Zijlstra wrote: > > On Thu, Sep 29, 2022 at 09:36:24AM -0700, Paul E. McKenney wrote: > > > > > > How has this been tried; and why did the energy cost go up? Is this > > > > because the offload thread ends up waking up the CPU we just put to > > > > sleep? > > > > > > Because doing the additional work consumes energy. I am not clear on > > > exactly what you are asking for here, given the limitations of the tools > > > that measure energy consumption. > > > > What additional work? Splicing the cpu pending list onto another list > > with or without atomic op barely qualifies for work. The main point is > > making sure the pending list isn't in the way of going (deep) idle. > > Very good. Send a patch. > > After some time, its successor might correctly handle lock/memory > contention, CPU hotplug, presumed upcoming runtime changes in CPUs' > housekeeping status, frequent idle entry/exit, grace period begin/end, > quiet embedded systems, and so on. > > Then we can see if it actually reduces power consumption. Another approach is to runtime-offload CPUs that have been mostly idle, and switch back to deoffloaded during busy periods. Thanx, Paul