Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp815246lqj; Mon, 3 Jun 2024 01:14:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJc/u7o/vw/veJFUbpYY/+H4XV6rc+6YySH3yFuE1+q8jtt7QHhSUikLSxr76T1rDUyuKgfOGxYZXX8Jfqmf6e26gH4nJswJjn5F95XQ== X-Google-Smtp-Source: AGHT+IHmT3dH0ZCOL55QufnaVwVC692/9Wic73x27C2PXGON8kJnqkFXR5LlAKAZndZ2/DqDoHH5 X-Received: by 2002:a17:906:19cf:b0:a5a:8673:cccd with SMTP id a640c23a62f3a-a681a877f29mr646631966b.30.1717402499564; Mon, 03 Jun 2024 01:14:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717402499; cv=pass; d=google.com; s=arc-20160816; b=tb1qN2SCov6jqnHM5qNxc2fK9XLFdIkndKwhLAD0Uy+e/0ZFAT6mG2uwVNccoLgo7t JpjVMAhrXjq9F2oABmDK14CQUdLt4p3UMNim2nwkBEWGOjx3Hl6plHNqT9L2oOALFO1W 2uUDm1O5JoeA+g4UGbE+Toc5T452Wsak4OD3/RR7sqJmWRHx4ue136aun5PZgGkV99Jw bDm+naUaqmMe+wSzXz0sJ3JTjasF594i2Vl1M03U+vqThQnzpFM/2t/QZY5Eq7+FGl/Q YNnyNe87hvMbidK83TtkRU0asxAiNQp9/fqVkkbZ7kYvZ0tYbTmf5HiyXVnnzfmsGoNf nE8g== 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=w1jsjob6JOgoEKksTIk7OReiRSSnVDB4hkBuPdbwUOw=; fh=a4MM6MvulhpLRZe66C9R3i4FO46lP24V6zosPIZLjE8=; b=lOknzqsBkZxoxDjKH2lc9+ygx2bAfbGE1pT6QyHk43mdN0duhL7cPB+NN7hb3YT/ju Qyx91gd3OdTa9lPAVYX5NrDwRROP8juy+BLofyAAitZHa3Q4A9ah7uH0AKGge/D/wYoz kTcAaT/cYnVvue6FF6V1Yf9L6XBhw6j181O8nLoEBaDJyqfe5PQhzaRHXJgKrz1OfcuM YKuBVJ3vvlX678f0wWF4AcqJrBp4KKlSyNd+624HtdBM6otlbzWtNZBl9SHRU7jOfqp+ DDRtMDJbYy798WtjdTfWanJVFauWpc4QIV1Z1Ximq9JKOXa/PbEYXU96/GIOlCnVyxnb bXNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PW0vZG3l; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=hAptKNFn; 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-198762-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68c2f13d08si218358766b.451.2024.06.03.01.14.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 01:14:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198762-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=@linutronix.de header.s=2020 header.b=PW0vZG3l; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=hAptKNFn; 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-198762-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198762-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 452461F21FD4 for ; Mon, 3 Jun 2024 08:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56E255026B; Mon, 3 Jun 2024 08:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PW0vZG3l"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hAptKNFn" 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 D95EC487BF for ; Mon, 3 Jun 2024 08:14:49 +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=1717402491; cv=none; b=sQdQAOF0r6QSFPQPGXK/fzR/Ur4BsmgneoZj4+VfsRmHvzrM1acnlswTQjhpjpnaSJPHH3KMNskXu339ZbYkTU6d/fIRiy+zoRJ7cb0tvKAV4muwy0glyhGWk9IccETG8NTSUw4RVtj4X7Sz3Gj3HoT2y/1Mc0EaMu1ZydJaCIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717402491; c=relaxed/simple; bh=lYCWB40QEFcFcjHUBJCzIlFs9DPHH5OHRa5rhdNjrck=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ipEzccLgp6QXrf9aWTl02qYazBh0WYdeH94bV2+r15LeGrqjOOTpgYUiEI+yKTM5+x0URAUbUV+bzhBPLWkRdfCE6C4qSQjd5w4rxEdkUuU9Gg8sAnS3rOzi6NI3H8lvIgo6KkGlUpZr2pp9vS6cr3ZV9bI0TL+4X3b9yjapcwU= 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=PW0vZG3l; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hAptKNFn; 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=1717402481; 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=w1jsjob6JOgoEKksTIk7OReiRSSnVDB4hkBuPdbwUOw=; b=PW0vZG3lkQUYjDefCBBGr4ZP1iXvH7TcDTOCbIHu9Qu735a+LDNnFZakJGL2+Liah+jwQD CLpVgeY2DAUJ6rHQHU7RML4XsJ+Tb2Px4ChcAnxUuJKdewVpAUUyUPxnNd26yAa7kJrJF+ v+1qPtUCVohltqB3C32d25eObqu+qwa+z6/Zzl5L4HCEl9Alv88S58QbXdx+5I76lEzLIx fbg5iXDdHPOIPDc70PuqpSqIwL6n13X++8E9vVxliBhrhv29uXO/QAu6EdUTT422QTAiiY nW2HqM3Dx/aI3v3hNF4VGmypT5qQNDyd+z9+37hOVnfltowCGWybcED51/XCFg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717402481; 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=w1jsjob6JOgoEKksTIk7OReiRSSnVDB4hkBuPdbwUOw=; b=hAptKNFnggbiil8RC3Zh/DZrePMF9wRmBBAgCFH0g68XKlgxGraAy1HXHzAbQt+u/FX9SB Al+fggy1bBa9OhAA== To: Oleg Nesterov Cc: Anna-Maria Behnsen , Frederic Weisbecker , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tick: shift tick_nohz_switch_to_nohz() from tick_check_oneshot_change() to hrtimer_run_queues() In-Reply-To: <20240602102007.GA27454@redhat.com> References: <20240530124203.GA26990@redhat.com> <20240602102007.GA27454@redhat.com> Date: Mon, 03 Jun 2024 10:14:40 +0200 Message-ID: <87jzj6789b.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 Sun, Jun 02 2024 at 12:20, Oleg Nesterov wrote: > @@ -1891,8 +1891,11 @@ void hrtimer_run_queues(void) > * there only sets the check bit in the tick_oneshot code, > * otherwise we might deadlock vs. xtime_lock. > */ > - if (tick_check_oneshot_change(!hrtimer_is_hres_enabled())) { > - hrtimer_switch_to_hres(); > + if (tick_check_oneshot_change()) { > + if (hrtimer_is_hres_enabled()) > + hrtimer_switch_to_hres(); > + else > + tick_nohz_switch_to_nohz(); hrtimers have no business with tick_nohz_switch_to_nohz(), really. That's a strict tick/nohz specific thing. hrtimers do not care about NOHZ much. They care about whether they can switch to high resolution mode. Thanks, tglx