Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp459534pxv; Thu, 1 Jul 2021 02:01:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNjQbjwigcxEWc4Y2ig/qhpIeX983Z7SG0Uz5Mt3mcpDPkVC0kj0qbcc4HTW/jV3h9UsP8 X-Received: by 2002:a92:d1c4:: with SMTP id u4mr8608870ilg.73.1625130111899; Thu, 01 Jul 2021 02:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625130111; cv=none; d=google.com; s=arc-20160816; b=WuYAw419T2iNN6AQ+ZTrJ05uC6Gmm2/bRriYvqz0l8ak3J8eO0XB03DT3UajeSyIjb JGGKIvIhwo7/sBVSzxZiW8hQS15K574Dyac7/9HY3fu6rJJJD2pkLQRTNVETRykll1Ru UskPgZwiAxB0Jf3Wk6JGDADfNTKkhi5ukot2ir7PN74EuLRWdGeFpGQTitD2wSyF58rQ QXm5B82Sq+1ZVJOEkPIJnvUmq+iyHdT4yYOtsYfYx8WLJhVfcKmYNiatfaKb4rx0TaQq WpoYzkmnPRE08ZAQYMAaOUoBPpO3E35Fm1JCoW/IITtqbDbijnxUUdP28WfACyJfpDJX KG5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2qqgC+Ulx5UrM01EMJZVrA3rn7EUXuF7xXclSNsscao=; b=i6XsuUy8FErN+/1BZGYOODgSX1n1ApSyA2VUnmdQI5nV/3uxET1CWD/UyeaNBiIfwN +arESk28739g9xs/8+0Ddk5Y4MCRZapLgdA8AQzdPLnbGH8SIxFzn1jDxR2LcdU0V5LI PlyU4sJ6i7zUvG2/eXupUz/91swTq6eNk1uXKoLPOGEI7x2vuzYhOFFJRrHx4Na7Cbpp R82cbChp4EgwnQxlKhNOqX4GBB1rWwgvWJNQuBTsI5An1i7wVoZJUcllMv1g5Yc4kZq+ 8mNKec7YpcrROYlz2nGv9an2W6Z6HvAyg+YDK6FWJvFxHD4QRsjc/kdYHiLXp2+tEMlo pGwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=hueftNHu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si26056325jao.68.2021.07.01.02.01.38; Thu, 01 Jul 2021 02:01:51 -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=@infradead.org header.s=casper.20170209 header.b=hueftNHu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235504AbhGAJCs (ORCPT + 99 others); Thu, 1 Jul 2021 05:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235088AbhGAJCr (ORCPT ); Thu, 1 Jul 2021 05:02:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A3BC061756 for ; Thu, 1 Jul 2021 02:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2qqgC+Ulx5UrM01EMJZVrA3rn7EUXuF7xXclSNsscao=; b=hueftNHuJVVsy8VqzYarbH7xZ6 OVqpjm1YF3YsRXMpBA9jY8na8Pb5Np44UNj+z3NT0Zr8bmiygqxQASHMJ3FJ48PrIY66O2CyW0q+M CMHrftyLF+oN2tuFIqWv7plKtDcNuCZzpmq+Tz9JoN43+LT+OBRSNn5LUqidFEUSSTHZVkQHKSf6E EFeEonSZHjDebT3OYHCeS+O7pgGaorDRmZ9O49Vv5s02ILgtEPDZ45vP4OJexU8k3uVwBkNxhAmbL SItpOa8tzZypbJVt+IDkP+i7Aux7rFjpuM0nvbpqnh60I6xqXpooyqZEhHUk17JXRKHBAxwDd3i/g JnAdCGlQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lysWh-006N2B-S9; Thu, 01 Jul 2021 08:58:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 029FA3001DC; Thu, 1 Jul 2021 10:58:24 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D45642041E842; Thu, 1 Jul 2021 10:58:24 +0200 (CEST) Date: Thu, 1 Jul 2021 10:58:24 +0200 From: Peter Zijlstra To: Suren Baghdasaryan Cc: hannes@cmpxchg.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, matthias.bgg@gmail.com, minchan@google.com, timmurray@google.com, yt.chang@mediatek.com, wenju.xu@mediatek.com, jonathan.jmchen@mediatek.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel-team@android.com, SH Chen Subject: Re: [PATCH v2 1/1] psi: stop relying on timer_pending for poll_work rescheduling Message-ID: References: <20210630205151.137001-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210630205151.137001-1-surenb@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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() ?