Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4773068imu; Tue, 29 Jan 2019 07:17:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN5TxRP1spGchooM2RP4ctheOpfDKgHKvRMA5AY8uHg73CCwdGPZbDhpuM3LiDWn54NRJgsr X-Received: by 2002:a62:b80a:: with SMTP id p10mr26454826pfe.32.1548775053655; Tue, 29 Jan 2019 07:17:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548775053; cv=none; d=google.com; s=arc-20160816; b=iB66hql9CvCiZ7LgeGuJvLhmlrIQZoX2m5iqPnR/yVzlkFTDPrVz1KtbczX9wrFiz4 USQS03bvlCi9AJ5nTXhWkF8vZsfWW6BtJs7YLHwsYcsDysV++7+sOBKcVYLDo6zr31uw e32Kh8jIPNEPj+ucpUL74fra27QG4nl9rau/1RmKVLnpFANuwar1w/khnPgKg2a2OLmF 6xV1w7m5C3KqAkGJWDzkgY4MVai7twHfrxbLgbOuBBG1xY0B8WtdrG4CKXiK06VsCdyd /DSPBlDw3e8PCIJucfBU8mzjyO5G9vgcwhZRMNFWtqGbqethl/3+CE5Gcx6ojYDmSG2a 8vqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Gjx0D2Hp2M6LW1jg+jUAo3bizRCgLIialUofJPerBW0=; b=hvZhTRAiY1SPr9E5A4npcPSp+Wa/O6jfUHT4goxORjnzB0hk280ZFdjmgti+P5/AEe 5vtPI3ueEMYAicHb9o6S6mqtynLnvMiaihLDnvhEdAWpJA2ZoXua4OeZ2Q70DJ76ZitM SCA7fzl8NxgmJNkBNVSm3BExnIqY4U2jeKOxLRODtZPcfKG0y40XiOE2jzlD/BQAOosD Cx9wRjiI+1J+1MyW2BbWIjSeynX/VeA+r79V61QQE5PCrRwgWF5uahsnHcOu/ptcD6NO 2nJzkkeoX+ekvVBei1m7/hIc93MzfgZEeng9zQA1LO56a/l34tN2NrRmT1DbiLjIco/+ b02A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="ZM1/k2tv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si35788579pgs.497.2019.01.29.07.17.17; Tue, 29 Jan 2019 07:17:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="ZM1/k2tv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbfA2PRN (ORCPT + 99 others); Tue, 29 Jan 2019 10:17:13 -0500 Received: from merlin.infradead.org ([205.233.59.134]:32776 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbfA2PRN (ORCPT ); Tue, 29 Jan 2019 10:17:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gjx0D2Hp2M6LW1jg+jUAo3bizRCgLIialUofJPerBW0=; b=ZM1/k2tvtEsbf4Yr3BAZU68P2 aGBBvKiUnJ+pC5oDVacZS5s3oyMtjDVlQLFFy8uUEUxLSZViutxEhxlBgCApf2IBQmpOcml9jf5Di f7H74YUBsdSIu4OA/tIhqmsDJUIB49ePezMZuopRrv4+la2rnZZ4x5SpBxtlBwOPUc93t1f2d0wEt QYsAZYHfu9GTwbS1+QIgz6TJr4hzdUdy6G4hycQWTDwJyqzrDUgwT/ZfkXqQpwcQnuY2idiRbxenN ADWS3xs25+rgsjAP8/QvH7fjMcKaT0IlurWuD8d2nBh5HNkIKCd/w5H7Zkw3Bkvpn7q5dNGx7JeOs +LXkOyuWA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1goV88-0002kd-8I; Tue, 29 Jan 2019 15:16:52 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AD64520101B8C; Tue, 29 Jan 2019 16:16:49 +0100 (CET) Date: Tue, 29 Jan 2019 16:16:49 +0100 From: Peter Zijlstra To: Suren Baghdasaryan Cc: gregkh@linuxfoundation.org, tj@kernel.org, lizefan@huawei.com, hannes@cmpxchg.org, axboe@kernel.dk, dennis@kernel.org, dennisszhou@gmail.com, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v3 5/5] psi: introduce psi monitor Message-ID: <20190129151649.GA2997@hirez.programming.kicks-ass.net> References: <20190124211518.244221-1-surenb@google.com> <20190124211518.244221-6-surenb@google.com> <20190129123843.GK28467@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190129123843.GK28467@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 01:38:43PM +0100, Peter Zijlstra wrote: > On Thu, Jan 24, 2019 at 01:15:18PM -0800, Suren Baghdasaryan wrote: > > + atomic_set(&group->polling, polling); > > + /* > > + * Memory barrier is needed to order group->polling > > + * write before times[] read in collect_percpu_times() > > + */ > > + smp_mb__after_atomic(); > > That's broken, smp_mb__{before,after}_atomic() can only be used on > atomic RmW operations, something atomic_set() is _not_. Also; the comment should explain _why_ not only what.