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 6CBFCC6379F for ; Tue, 21 Feb 2023 07:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233478AbjBUHKy (ORCPT ); Tue, 21 Feb 2023 02:10:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232955AbjBUHKw (ORCPT ); Tue, 21 Feb 2023 02:10:52 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AF1122A2F for ; Mon, 20 Feb 2023 23:10:51 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id s26so13107831edw.11 for ; Mon, 20 Feb 2023 23:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Kgb49vjgU2eT4Pv1XI+e0Oh4ocAtL7C6GhW52Fh4Hk8=; b=kgLFzsPsxOr4mC6okfdWGQSZ+MLnmYES4U/clA7dAD4Kv3lDJ4VDzfvgbTqmdLX40F li+JSKAU7GHvf00CwLYEyVDyAHFnhQTfvyq9Gf05eo62ydlDW9+cAcvgG6urNndtStr0 r5zDGgBbqy9qlgcsj4d2LcGOe0DPE7ZAGJNX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Kgb49vjgU2eT4Pv1XI+e0Oh4ocAtL7C6GhW52Fh4Hk8=; b=MHqZbH6iOaPN1AlaJozH6C048PIbGua/vHKVW1VAOZsqVEEfs4laVT9nUkC33AtWk4 EcxK2+aTlUlJslxXIzMvMWLr0sPeDwFNMCmup9PQfx/itfidDFDxudlr83pIopXZ0Xae bXtdr9M+46rtISEvZlLVxHbjTU+LbnFjSQHG8y7HHrdRn1W6eG6X4U/8tgn+gufYsJR+ ikhZU3CJc6suie11cj+zVsf3LS6ABwNAOUFIYc4WCkg9lA6zAuc3B5z0oqqRzZ80EEVp W0mhaqamEh+56ZUHNpluM9SPpXorgAEzVW8twpuGWJLl3KNdc0aKcUoFP0TfUB256Iz3 qCZA== X-Gm-Message-State: AO0yUKUQE+t3Y0aupzzxLKFGbO2E7vxxacuTPmr0NreR7oD2IMykA8F4 vt0J9srhMi9XT4xcCrphDqLhf1Ena2ag9ZDbYCh37A== X-Google-Smtp-Source: AK7set+N4IPd4or5RkW+Czctx3mfhAps/tBbtiKsffNIzsNinXZT0OPZ6DlieX1f4hQZixjwisH+gIpGpVls58TxWn4= X-Received: by 2002:a50:d544:0:b0:4ad:6e3e:7da6 with SMTP id f4-20020a50d544000000b004ad6e3e7da6mr1297538edj.6.1676963449702; Mon, 20 Feb 2023 23:10:49 -0800 (PST) MIME-Version: 1.0 References: <20230211064527.3481754-1-jstultz@google.com> <20230211064527.3481754-2-jstultz@google.com> <87o7porea9.ffs@tglx> <87a618qlcp.ffs@tglx> <87sff0ox1a.ffs@tglx> <874jrfq3jw.ffs@tglx> In-Reply-To: <874jrfq3jw.ffs@tglx> From: Michael Nazzareno Trimarchi Date: Tue, 21 Feb 2023 08:10:38 +0100 Message-ID: Subject: Re: [RFC][PATCH 2/2] time: alarmtimer: Use TASK_FREEZABLE to cleanup freezer handling To: Thomas Gleixner Cc: John Stultz , LKML , Stephen Boyd , Arnd Bergmann , Michael , kernel-team@android.com, Peter Zijlstra , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Tue, Feb 21, 2023 at 1:12 AM Thomas Gleixner wrote: > > Michael! > > On Mon, Feb 20 2023 at 22:32, Michael Nazzareno Trimarchi wrote: > > On Mon, Feb 20, 2023 at 10:18 PM Thomas Gleixner wrote: > >> * 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); > >> + > > > > ptr->it_active = 0; > > if (ptr->it_interval) { > > atomic_inc(&alarmtimer_wakeup); > > si_private = ++ptr->it_requeue_pending; > > } > > > > Should I not go to the alarm_handle_timer? and only if it's a periodic > > one? > > Why? > You are right. I will pay more attention to my reply. Michael > Any alarmtimer which hits that window has exactly the same problem. > > It's not restricted to periodic timers. Why would a dropped one-shot > wakeup be acceptable? > > It's neither restricted to posix timers. If a clock_nanosleep(ALARM) > expires in that window then the task wake up will just end up in the > /dev/null bucket for the very same reason. Why would this be correct? > > Hmm? > > > > Michael > > > >> spin_lock_irqsave(&base->lock, flags); > > Tons of wasted electrons > > Can you please trim your replies? > > > > Thanks, > > tglx