Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp787679pxv; Thu, 1 Jul 2021 09:12:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9HDG49f7vpdvgblMwhZf91aS6YZTneCxc3HX8fh0ArI6nNIk/BQKQiw+XptGptzGWMnz8 X-Received: by 2002:a17:907:9603:: with SMTP id gb3mr664703ejc.398.1625155977934; Thu, 01 Jul 2021 09:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625155977; cv=none; d=google.com; s=arc-20160816; b=rFhXrORzyq0voLWPPVjx/L50itzt4Bl5cGBiAoEiyfU0iKrBY5medzsR3PzJ1p8sEj 5rUE2OqMjDZ1uAn0ciDWJQup6WkjkuR14kcit1JXe8F+Zxp/XGxvvSi6zoDWFMzIfdL0 6GmcWqAnB8K4zEqiZNi1J1xFXndaNe2PbtkEzM6zifdOnObibNR9JbFyx3ESc48lZpg4 BsybdiOTHWMtJm4s8E98QonJG8bulsBackW9zaUXCESo4XBnVCK2KH+g2rHBX4XxHmTU Vg/7HUUL1aUr3w5D10pQoSbTQyLhkNcHb+pdBMnurvUoF/UFk4ExlQFhyvcqvB5HTXO8 ch8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uzi1kcVee3nZI004Eqmdf8y65g93K4CPvU+WDS5oQ0o=; b=YYFlYMysKiPcDlRlFZYeDWXRaNTSDIByzWan1EMv5JIgrxPqjoUnjIAo9FPwPW505n t8DlYLORPmnJC04vKZQRA6oMYXPZHw7bjOsup3Z8BhvG0U/NH+2bkHGSKW3/HBWn6dN4 6DuxOGjJL5H6KBzPkaR1oAtg7uWHO0ylephFfwy8kDX+P4xf0JGkPLTDhyGNw9X8wiZc AMILs99FOoM0ukKNkCNqt47bxit/VV0mB1CLy1KGr03OuSn5R/YkVJnRe/hindgtaJ1u quR+MsCrZGqKQm9HoAQOJh8gXo3k07mLrkgqnMMMmohiYaF90ydt3mwH84/Aig2ufrMD HRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UbI4Nvvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si170856edr.310.2021.07.01.09.12.19; Thu, 01 Jul 2021 09:12:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UbI4Nvvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231915AbhGAQMI (ORCPT + 99 others); Thu, 1 Jul 2021 12:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231698AbhGAQMI (ORCPT ); Thu, 1 Jul 2021 12:12:08 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA37CC061762 for ; Thu, 1 Jul 2021 09:09:36 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id s129so11712678ybf.3 for ; Thu, 01 Jul 2021 09:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uzi1kcVee3nZI004Eqmdf8y65g93K4CPvU+WDS5oQ0o=; b=UbI4NvvhXAKF6UJlUQJnCnIZTrPzaWdjQcU6NH0GrVU6eIit+YEfiMywDOAfxqk9o9 tAUXpeb60OkDSx9bD6lOX62A/UBZAJD8ptJRlCml6KoBg4ua6O6q9JCyDDSeZAj+QAkc WrJ5xeq2NOCp7aRcUS+yoclphDIkKOJdP8slkfbniGOfPxYm2Q/Jjjtv4olDqfLSSyxZ Dg7d03u2ogyibOVT+ShLOuJkKEI+IxOjT8XjAxolKK3GwvR6JtkTLTQBfj7oACQa/1cF C9yD3GteMdLWIIqy6hn/UTSwQ4n+A0f+lkYgWr+9bF5kE11px+0WS5EtvAqbmPm5iY/O 0TgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uzi1kcVee3nZI004Eqmdf8y65g93K4CPvU+WDS5oQ0o=; b=eNqRqIPrU26jsyCa1FwYwefa/Isa/GHrgQ38bVGKsWeB/Mcuz+E2kfMQzjRMoQh4KJ kmXDK9fBldQB/uq7s6ZH34HRd43nSzjzL8PQ1F4EVMVTV69TgB8vOfO9PgxqYkfkVNXW zRxi/GnxFfZPeeARKIdp+joBHAcW8MJeDSt6p3e3HG8ktOoDICkxM0DFwudIcKx48KML sruyspJ+ivRc+ROi0gKfM9i7woVLu9bT1XxL5iyAr4uuAVLnd4eJ+R8zo7EwAd7a4h2u JvKpSkNUeBk3Am/M7ZoNpCmYejBOIe1Pr6WtEfhya0q0GU4f7jFOzoPeIrzed8DosAjt 2Dow== X-Gm-Message-State: AOAM532wXe8FRrlrNNuBjUUMMp2zyUtgIIUGLsTyH2DagNVdW3GFymid jPCgqlpuTomhUdzZVeoFCRhQwgVBEnDukbrxYH67kg== X-Received: by 2002:a25:7ec4:: with SMTP id z187mr668800ybc.136.1625155775937; Thu, 01 Jul 2021 09:09:35 -0700 (PDT) MIME-Version: 1.0 References: <20210630205151.137001-1-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 1 Jul 2021 09:09:25 -0700 Message-ID: Subject: Re: [PATCH v2 1/1] psi: stop relying on timer_pending for poll_work rescheduling To: Peter Zijlstra Cc: Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Benjamin Segall , Mel Gorman , Daniel Bristot de Oliveira , matthias.bgg@gmail.com, Minchan Kim , Tim Murray , YT Chang , =?UTF-8?B?V2VuanUgWHUgKOiuuOaWh+S4vik=?= , =?UTF-8?B?Sm9uYXRoYW4gSk1DaGVuICjpmbPlrrbmmI4p?= , LKML , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel-team , SH Chen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 1, 2021 at 1:59 AM Peter Zijlstra wrote: > > On Wed, Jun 30, 2021 at 01:51:51PM -0700, Suren Baghdasaryan wrote: > > + /* cmpxchg should be called even when !force to set poll_scheduled */ > > + if (atomic_cmpxchg(&group->poll_scheduled, 0, 1) && !force) > > return; > > Why is that a cmpxchg() ? We want to set poll_scheduled and proceed with rescheduling the timer unless it's already scheduled, so cmpxchg helps us to make that decision atomically. Or did I misunderstand your question? > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >