Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp330501rdb; Thu, 1 Feb 2024 09:37:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6A+rs5gPo2WB2sOSSbfpCc9+xUuGUOkbEvJARErg6WH5akP4IQvo9NATQEK1d43G0gSyz X-Received: by 2002:a05:6a20:5586:b0:19c:9f51:a8db with SMTP id kk6-20020a056a20558600b0019c9f51a8dbmr9240293pzb.7.1706809059080; Thu, 01 Feb 2024 09:37:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706809059; cv=pass; d=google.com; s=arc-20160816; b=ZIMlXwqema8EYH03s6JOSFCTeAq7cwDDVA0wHra8iaOlhV+sEPPcYluggXcJR/VCTM 4sU0zxryGvhr6k9k7c9p6+5lIQHqduiuyvpy+IUhXDoC9WXScueYsv97qFj8qkagoJAq xQJmomVRFDc/zqv6UiCGTxwAsGxkZOicAjsw68g2E5eynPEuU0JrPt995udxLEuis4+V VvgigiYD3bBcQtDqIA8UACRpu/yTn1R9cEjC/kTl7Sx3jMfBOqD/i0YRXoWDEenG1BV+ hk1qrMbM1uH+ZiV6Ze2YktCPF+ka3obhPiur2pLlKrmMojtYb95hxcMN/r8CV2U/+0TU +6Nw== 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=fCgOJpby5Qmajfmi57yUvTMsS0ckuvrRnoImQMDkk5A=; fh=JqLjNsviMwgFQMy69hyz92ZtpstKJ1BfSl5RjMsHQI8=; b=RWeyXoFqQWAJsBXxL2EqQNpWMEOINx24clHrFRQouZM/5nbwb7HTBJA2SFR4a5TpQa jS5ezefQhI0JDEM18g5gfSaY0uL0WR/HUeSPwX50vUtU1sX5k2ZsgziTOXMaLxsQpIxE d8g1dJp5l4bqx/E7b+J6H/qEyiASJgrMU/ItaAzxcgE3LAv/WKCX/B95TYTt+bHB931V LUAxSxRr5aVtD+JrWDWpebyBEUvUoPPAXbxEQUfkbkGRdq4y6Tz1zlBII526CfWBkBBA 1CZCQ+LBK9QSlJy95hn9WwnMvYz5qxzmCMUSnRTA4h3fWUboxlRt2fbTBxpIiwAIonAx /Pxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qVC4r455; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48601-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX5Z59ERmOG2JonwOW7zFAkJbtUE/R3l8CDVp+EB/VSI3cn6oRVOCpz1c0KPhgaQL6rSP6O0dSsHqYLLA3vNszCzOB/bKQ/v0eqvIdQbw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i32-20020a635860000000b005dbe38b2cfdsi53027pgm.494.2024.02.01.09.37.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 09:37:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48601-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qVC4r455; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48601-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48601-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7E8A228683A for ; Thu, 1 Feb 2024 17:36:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CE8E5C04E; Thu, 1 Feb 2024 17:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qVC4r455" 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 97C0A5C045 for ; Thu, 1 Feb 2024 17:36:07 +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=1706808967; cv=none; b=GRP7pSxcqY3CcVUtGsby0UubVfEc7DOdeJrh/mL5QclDoXl43jGT6ZsVMsA9WgzGBL1/kIzvyYDlWpSVpfuli4350B0p+q8321lx1P+BrSEAe5rOpVmDjICIpCNRvHbpV+AKlAW4k5Nxd3teFlvqKhHxpXCIxSCBIsDJYXMODv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706808967; c=relaxed/simple; bh=9aqnwUZw2VzPx6YXrvI06CXs6pH2ImPhPIfzFD6ifCg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PIc7wrc6cJb15XPQswur9i+yGyzNHHHp0vEZRKNWpryHuG56B6uygI7FMrt3s8MUboYbynKZGnpsLjSmr7/ZX5V5BmzzOcjkGNMdCwcmJCAiUJLqmm6UhgVb7rvhSZrLfRxZoyP+O9FJWvhASeTPEfPQOD9WC4KKQYNO+pX9N80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qVC4r455; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0982FC433C7; Thu, 1 Feb 2024 17:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706808967; bh=9aqnwUZw2VzPx6YXrvI06CXs6pH2ImPhPIfzFD6ifCg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qVC4r455zeZHOTq8GShLCnYvqDDQSXamdlsJR6wHEQgT9zRf28t4Cn2TGU9s6Bf7M nRBr3dKTQ5/TGd2mZg69FuketEYkivjI1J/m7K03coBqWF24+wD67vwHGqs0ZY/9Te KjSMlf9vpbY/Z2SpPZdJeLdO74BFModC2l1k7yGW+W7UrRRapavL+ODkXhW3sDV4xc T2+idkFWo54jgCkqalZJGoJXUkXnz5aa3C4Um3+ibBD23nWpFr/dVx83MM1cW0CKO3 reFIn2MSkhDqSgCM79o7m+Cdixa/ekASU9n+0sAUjkg2QB0WHVEbmMSKlxPCUW0Yt8 Wbylw6MguJYTg== Date: Thu, 1 Feb 2024 18:36:04 +0100 From: Frederic Weisbecker To: Anna-Maria Behnsen 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 , Richard Cochran Subject: Re: [PATCH v10 20/20] timers: Always queue timers on the local CPU Message-ID: References: <20240115143743.27827-1-anna-maria@linutronix.de> <20240115143743.27827-21-anna-maria@linutronix.de> 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: <20240115143743.27827-21-anna-maria@linutronix.de> Le Mon, Jan 15, 2024 at 03:37:43PM +0100, Anna-Maria Behnsen a ?crit : > The timer pull model is in place so we can remove the heuristics which try > to guess the best target CPU at enqueue/modification time. > > All non pinned timers are queued on the local CPU in the separate storage > and eventually pulled at expiry time to a remote CPU. > > Originally-by: Richard Cochran (linutronix GmbH) > Signed-off-by: Anna-Maria Behnsen Reviewed-by: Frederic Weisbecker Just one detail below: > @@ -590,10 +590,13 @@ trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer) > > /* > * We might have to IPI the remote CPU if the base is idle and the > - * timer is not deferrable. If the other CPU is on the way to idle > - * then it can't set base->is_idle as we hold the base lock: > + * timer is pinned. If it is a non pinned timer, it is only queued > + * on the remote CPU, when timer was running during queueing. Then > + * everything is handled by remote CPU anyway. If the other CPU is > + * on the way to idle then it can't set base->is_idle as we hold > + * the base lock: > */ > - if (base->is_idle) > + if (base->is_idle && timer->flags & TIMER_PINNED) Is the TIMER_PINNED test necessary? If base->is_idle, then the timer is now guaranteed to be TIMER_PINNED, right? Thanks.