Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp4937lqd; Tue, 23 Apr 2024 12:40:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWudANEF98753WVouMNed4Q2w9mrXhVHonrm6qKfNIid43PUzyGbycYyd9oRfdLlFZ5z8mkMZLiypQyJzIeUnatT/GYGTMGtBlcd448uQ== X-Google-Smtp-Source: AGHT+IFYcxwU6nG4afXviYSHLOnY3SGL3QjXBCdWN1fbuN7+NGesSzOHGe25wzPyhvnuW9Sbh13d X-Received: by 2002:a05:6a21:9203:b0:1a7:92dc:29f2 with SMTP id tl3-20020a056a21920300b001a792dc29f2mr418373pzb.49.1713901213066; Tue, 23 Apr 2024 12:40:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713901213; cv=pass; d=google.com; s=arc-20160816; b=uXFAkw90CLJpLPSS6pysw4qQm67mO99nCSkwd+Yu4tcSD0Jmk2AvobBLSCcypxdCYy HQA8wYkNceTxzHfhMg7lmYjW9qxfUJzkO4Uzw+d2TQftWQ6On/7P2AkvyjpgvPNi89pj M/bygO0yTCsvE3J1uVyFw5CsamyWNIzEDg9gWCgdfatyS/tQVYYDaTzl6r2tU/s2gMKX HO8MdiAIRo3HcMZVCRQ8WjGUM/qen5LPd77hnvz9FCFXk5h1Vg98EjGetDyATbk4684s xON/zx9F8s957GCU3CNW6K3FcBODpXEJaIUW94c/GmMO7HaeLTeKE3w5zuUZhMvM44ZB 2yEA== 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 :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=+YiCHdAPB572aSbjESH5KP8zB6n7UfdaywX5A5C+gjU=; fh=tsYeUzTy+1NBn0EQ4FbbmcoF+ZbgZZmzDSBrnjOtvQ0=; b=tgpPvrmTnV9o+utVQW3iAPeVArKXh7BxZUpcP67ooIYMhuiEV1/0vdTtoh8gpZ1f4B 49qhGQn8zhv6UlqP+YmDxZs2UU3o+rVwnJFrA34a8HWTGFF2OiO5mWjWelc2bmKBdP5+ L1NJ65CnUKy8Lpy7dBxTVV3J4oieC39d6SePhqNFHvh/RB3inevWclqn5ig/t2zTYahY IrB/2a7+0K+YN/zjgECa0j3rNcIQq8lwC090xmCVU+6FMThkPt73mHCjrhdPbtpff/GI QkDUf8UkH5NfPRmi+hpy8LWtnIy8zOiBk9r0SXLC9mDy1pLiNLGbQxqPnYhyI4rlxFXq sV7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gtK8AuyF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gmlmHlpc; 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-155811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b13-20020a170902650d00b001e435d95c63si9641726plk.315.2024.04.23.12.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 12:40:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155811-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=@linutronix.de header.s=2020 header.b=gtK8AuyF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gmlmHlpc; 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-155811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155811-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DE1F7284275 for ; Tue, 23 Apr 2024 19:38:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8DE21DFD0; Tue, 23 Apr 2024 19:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gtK8AuyF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gmlmHlpc" 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 BE5A313FD65 for ; Tue, 23 Apr 2024 19:38:06 +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=1713901088; cv=none; b=hScK+mruW8U/S86uL5gQn2wCrraadPauiT64vA6KawGJuyRtr7E6QHlA4mMucOUwU+MC/QKD2pHK9gCPpT1r1ktlgP7FAwMdKgQsayCCs8AQSk1x3AGx9isFLPGEOTQ3uc7NxfuY2XvURf16/XCdXBQwRwANcbQayvWe5JiOD+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713901088; c=relaxed/simple; bh=+YiCHdAPB572aSbjESH5KP8zB6n7UfdaywX5A5C+gjU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=HKW1LR5HOVRuZbJ9kgMPr6F9HGkuv0mpZNQP5eRVQWkGdHG7HfD5ENhT8Pn33ADPB9lfPrzvGyw3P+pLc80bHPLH6D37QFccIdAlS7PCoyWu7Mgo4sr0dsaVPNOUR2SiLfm2WTMz1SLo6qSkVUx/dg2MZRcr0DZahBiGdl5wvq8= 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=gtK8AuyF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gmlmHlpc; 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: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713901084; 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: in-reply-to:in-reply-to:references:references; bh=+YiCHdAPB572aSbjESH5KP8zB6n7UfdaywX5A5C+gjU=; b=gtK8AuyF0MZyXAOwSEqKmYMzibxH4g7OpQZKwtxu/8kX4NuCS1Lcjfo3Be/GqMS5AVKEs0 AYdEabUiSgDtY2/GKZ4wthQWKrh3W3pEK6uOnZf4GF5zuY6EkUHtsLYl4yJciJBNTN3Iad tva5Mzt0Kh/omSmDU9ICzhY9GPu2B0blRpLB8AG+z4jKaqbMe+dF8912tGYnnJuIslNA3z zmR/jCQ1tnzjFcZ9JgGz0hnYhoX+691vnzh6HHFsVadxv9akkOGVrKEIR1eoMBrpzbYbKy ibSUGuOrfWDTY+MFHNkHP4sH0jRho3nntxycLN8VgMMMr8J3OciseN7QRAeuiw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713901084; 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: in-reply-to:in-reply-to:references:references; bh=+YiCHdAPB572aSbjESH5KP8zB6n7UfdaywX5A5C+gjU=; b=gmlmHlpcSoXy3T6hYEd0HvM0k07lqvLFr+LcvJUe5p6Yjml8x3t95Hp7IOl9vjkYyw9PeJ gBi55cBNMI01yWAQ== To: Anna-Maria Behnsen , LKML Cc: Frederic Weisbecker , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Eric Biederman , Oleg Nesterov Subject: Re: [patch V2 20/50] posix-timers: Consolidate timer setup In-Reply-To: <87le5djng7.fsf@somnus> References: <87le5djng7.fsf@somnus> Date: Tue, 23 Apr 2024 21:38:00 +0200 Message-ID: <87v847uaxz.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Apr 16 2024 at 18:12, Anna-Maria Behnsen wrote: > Thomas Gleixner writes: > >> hrtimer based and CPU timers have their own way to install the new interval >> and to reset overrun and signal handling related data. >> >> Create a helper function and do the same operation for all variants. >> >> This also makes the handling of the interval consistent. It's only stored >> when the timer is actually armed, i.e. timer->it_value != 0. Before that it >> was stored unconditionally for posix CPU timers and conditionally for the >> other posix timers. > > Shouldn't we do this similar to the gettime() and set it_interval > unconditionally? No. If it_value = 0 then the timer is disarmed, so it_interval is irrelevant and just should be 0 for sanity sake.