Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7433DC678D4 for ; Thu, 2 Mar 2023 22:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbjCBWV5 (ORCPT ); Thu, 2 Mar 2023 17:21:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjCBWVy (ORCPT ); Thu, 2 Mar 2023 17:21:54 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FCFB497EF for ; Thu, 2 Mar 2023 14:21:46 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1677795704; 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=/1n/ROxIHqZayGJxa8eXPMWIIxktIxbvHrx7Bf6iSnQ=; b=D1TXnRvfYUcuAYT3eFsAE6E1KVpt28ArnWEgPfWaDLt+cvzjzysPW77z0GAuGuHsvL7mpx mwqtxFvpLYxuwxALhpR0JAIe5am3crbn5hHvt2ZM+K7tnRrqbZhupdginY7iy9KqdYaexg 1E9jTEHmF++jbSVVYrmp91TiHvOU8oTakyvwmSt4L9r+9CNagyMLvjFn2QP2EWWLtvTEgL /j3LnN1EzPDqfNNhaDP6Yu/AFxGQ1vjMb5+UCLvMkB/I+LEo4UIBCHTYvVbToQl+qDVWDJ LidfqabUZY84BcVVn+uL7BPsBd3CZaI2KeMRvTNZVVQYIm1l3xtSSjVQO6PG6w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1677795704; 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=/1n/ROxIHqZayGJxa8eXPMWIIxktIxbvHrx7Bf6iSnQ=; b=HGyvwvSqUko/UwiEeY2KoxeNHPQ5Nvr9nHEhKypGcEIFBI9+9BUBbCobX53QWbtfp838ou JmqpTIGKzGzuIYAQ== To: "Rafael J. Wysocki" Cc: Michael Nazzareno Trimarchi , John Stultz , LKML , Stephen Boyd , Arnd Bergmann , Michael , kernel-team@android.com, Peter Zijlstra , "Rafael J. Wysocki" Subject: Re: [RFC][PATCH 2/2] time: alarmtimer: Use TASK_FREEZABLE to cleanup freezer handling In-Reply-To: References: <20230211064527.3481754-1-jstultz@google.com> <20230211064527.3481754-2-jstultz@google.com> <87o7porea9.ffs@tglx> <87a618qlcp.ffs@tglx> <87sff0ox1a.ffs@tglx> Date: Thu, 02 Mar 2023 23:21:43 +0100 Message-ID: <87zg8ukd54.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 02 2023 at 15:32, Rafael J. Wysocki wrote: > On Mon, Feb 20, 2023 at 10:19 PM Thomas Gleixner wrote: >> +static atomic_t alarmtimer_wakeup; >> >> /** >> * alarmtimer_fired - Handles alarm hrtimer being fired. >> @@ -194,6 +196,8 @@ static enum hrtimer_restart alarmtimer_f >> int ret = HRTIMER_NORESTART; >> int restart = ALARMTIMER_NORESTART; >> >> + atomic_inc(&alarmtimer_wakeup); >> + > > This appears to be still somewhat racy, because the notifier can run > at this point AFAICS. Indeed it is. Let me think more about this.