Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1131722rdb; Tue, 30 Jan 2024 08:45:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHCtIxfHlslgGIeWjIW7nUTs2nf8ndTh73oqlk5Jn25fQlpR23dYdcq7CefpPL2888dZDc X-Received: by 2002:ad4:5f0c:0:b0:68c:513d:bf1b with SMTP id fo12-20020ad45f0c000000b0068c513dbf1bmr4521183qvb.65.1706633141214; Tue, 30 Jan 2024 08:45:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706633141; cv=pass; d=google.com; s=arc-20160816; b=Ax8h8Pj6nGIggzL2tSPrnv5SveLkRQiu5GRcjOKFltOyOx0aMFijHCXCbApl537Zo4 YyvjJQQKbjoZsyq6zU1fB8S9wd9yUPn3HNNr8L96VjteaB726f57XqRAInEDNu39CuRK gXoM8NE3QVTeSbEs/AbZAGXlyvyCriqj87Sis6PXucNGcL+rlHYjIVlAJt/lPgjvKQ4R Th5Uh7qIJHXb5FhNO82nyegHz1xaw+t8jkwxEImjhMAi07ajpTEcdabQ2EmT6EIgBrIK /nlrYsLlHQ0F+Nsl3BBJ/Ls2FeHdq2ow+QNVijMGmPIvyTIW919FZPT6YfZjy8pHRmk4 ks5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=V73c0bJOIfsp+IxKwdVANpoPIBXYkA+Z/1o8vaANWpA=; fh=0xiuIgYwmqWERslX8T7WXvksK/H3CzUuWu1+0FDLmHM=; b=fdIBvDheanxJ5jebW7/9x9Ltb3vWCrBr5IyE1PJzgBBojYZSG9fEhBpwMWLVMHm0Nj Xkz+dae4YWxVqqodrJEgt3PUxVOPOy+6SCDtHoATG19RXUEPS8TKHr+7L4C2SvRjHCYj ZZD/E9n1+niH220L7yns1zaRUkldM2k6f2qdZ6Zj4BkTpISc4e6WOy8UZYAc01pFZtTJ YUhGk5es3SAxSYtVQh/t4UkmEZ7nw5PyHlkBQ6vVaJ5sCt9OWyjN+ZgDjrn+hnXOTliV Pqpwgg9+FcTQTRSMfZEpjJzNn3w+vjlRl/4rZ6sbixeuUrlSz079Zn9l1oNw6ar9fIMa DcPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=o66xEKtp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-44973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs8-20020a056214226800b0067f1b8febe2si10258969qvb.98.2024.01.30.08.45.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 08:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=o66xEKtp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-44973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 873791C24534 for ; Tue, 30 Jan 2024 16:45:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 413871272D8; Tue, 30 Jan 2024 16:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="o66xEKtp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="c6hfqlMT" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 71743823AA for ; Tue, 30 Jan 2024 16:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706633111; cv=none; b=fvp+puQ+Al6+z0j8uaePRxlQ9D6bOUhSwhK+4xsRIIZEPMZP92dEQ3PBgYbGyfTnCRzbY0ioPnOorTofnbNZMyySm1uVNHuEzlh+0pRMXdGfA2sv3Z5UL8yLpEvNx1CCAxqONlSt1eqYVFP/ox2LTSAIHieQ14Rf6SQB/j42SJA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706633111; c=relaxed/simple; bh=gu861JxVK+YlPBKUGVxXJIPtb1yCoYWMQ0RkEI8EOec=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=aaMG8EUa8o8rli0pSyIIYmmqea3Te27rrZUcoHOxBbAvtWDPuSlt5ksqF5CPRWc2jcETeR+37lmP97w+6nDX8SBAdu3zd40ogOn8r7OLPvNptGUCRTAWl/jk3nQVKGXZ+eTmIeqZzqZGAQOsQxw7aSbYxCpBf+0k1h9snCOAzqc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=o66xEKtp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=c6hfqlMT; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706633107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V73c0bJOIfsp+IxKwdVANpoPIBXYkA+Z/1o8vaANWpA=; b=o66xEKtpWAyWBjuYIXjt6O6wK+mF69FtbbGIN4xsTRACmm1jcQjZN6bPSIVf8kdFduKzGU v56NVJ4RhgT0pyeVTVhcV47FDmwfPUkC/tm99GCk6wo6SnMG84JFhfkUPyY2+PEFcWvQMx gRHt+/QZtZIBPklUuarD8ywNA3uBbOEqW/djL1tS23KG2K8V9+7P8Ce2sUZ34zQyAGuQNb Bwln6EOAagc++3ozzueT4yoHyj9we0PRDDcfdEel/E3nhPw6kG9GF6k9RYpN1o+7Dt65hA a4+UGSHH9cYOn0hKEwmr2hEzesWoT4Bo1CQN1BTFq8Ok4R4rtN2qUVNEez355A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706633107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V73c0bJOIfsp+IxKwdVANpoPIBXYkA+Z/1o8vaANWpA=; b=c6hfqlMTVCJbI4Vzr+47FdgIsdk24rflmxOECbLfH3ig/8CptXsEFeZBJnkJPqxHxZ68VE 3JQhCceeJlDxjACw== To: Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , John Stultz , Thomas Gleixner , Eric Dumazet , "Rafael J . Wysocki" , Arjan van de Ven , "Paul E . McKenney" , Rik van Riel , Steven Rostedt , Sebastian Siewior , Giovanni Gherdovich , Lukasz Luba , "Gautham R . Shenoy" , Srinivas Pandruvada , K Prateek Nayak Subject: Re: [PATCH v10 18/20] timers: Implement the hierarchical pull model In-Reply-To: References: <20240115143743.27827-1-anna-maria@linutronix.de> <20240115143743.27827-19-anna-maria@linutronix.de> <877cjtcuv4.fsf@somnus> Date: Tue, 30 Jan 2024 17:45:06 +0100 Message-ID: <87zfwm93e5.fsf@somnus> 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=utf-8 Content-Transfer-Encoding: quoted-printable Frederic Weisbecker writes: > Le Sun, Jan 28, 2024 at 04:58:55PM +0100, Anna-Maria Behnsen a =C3=A9crit= : >> Frederic Weisbecker writes: >> >> + >> >> + if (tmigr_check_lonely(topgroup)) >> >> + return READ_ONCE(topgroup->next_expiry); >>=20 >> When I hand in tevt->global as a parameter, I'll need to compare the >> first expiry of the toplevel group and the tevt->global value and return >> the earlier expiry. Only a single child is active in top level, so it >> might be that this CPU is the last active CPU in hierarchy. >>=20 >> I didn't check all the way to the top whether all groups are >> 'lonely'. So when the top level group has only a single active child, it >> is also possible that the child of the top level group has two active >> children... Then a return of KTIME_MAX would be also a more precise >> forecast. >>=20 >> This quick check is there to keep the overhead minimal when checking >> whether it might be possible to go idle. So I don't know, if we should >> add this additional check per level (which is pretty simple when using >> group->parent for walking the hierarchy). What do you think? > > Not sure. Maybe if the tree never exceeds 3 levels (does it?) it's ok to > do the walk? Levels depend on the number of CPUs and NUMA nodes Take 4096 CPUs, all evenly distributed across 4 NUMA nodes, then you will end up with 6 levels. Thanks, Anna-Maria