Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4610253imu; Tue, 29 Jan 2019 04:39:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vN/o4rGy3ZjmhiZF1WG10wGZJvVcsKFtOn9hf8QyNBQf8clB3EShyFXAlFKIk4D/CCEhY X-Received: by 2002:a63:e516:: with SMTP id r22mr24000736pgh.256.1548765561555; Tue, 29 Jan 2019 04:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548765561; cv=none; d=google.com; s=arc-20160816; b=AkP2vkLi/6EG3jxtg3uNgF0MDhbYsy7er8x4rIF24x3OvVToOdyFFeO6yHc0RTTNNz NnsfgAfOSnmW6KjU9XNe1c8iBhf/O9BSRPpdXjEB4jQ0CjvSTN50SfWAczB6A5Ofan1s zPBJunWMWfxcuR7l9Vh3yyxK3OG8cu4k84wIjIdt46uqZ1ehZvopmrCRRre0twczDPCr 8fkpXFfTCQXjUOQU7t4vMyNEUjMVjVmHeJPNW6QaFmTzeQmNtQKB7hEP3YXyfM1DLfZs rPsWOm0CLhtUU0wHYdrXI5tI88MK3+/XeUurTb1uQY+A3cGQD+Ow71QOisfBBRt8tyeC EDTw== 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=hcUmsWqOlUZoA0tGVtVxZVeGi9/WntceTQMLGURqW8U=; b=ZEDVkSLZUpqW1nqQG227WDDPAHDU9/lUrRBx17K0NAKU4BFFEoQTgArq1nScYYrnR+ 0hObdf/GWTj1LLVZVpWKsk4Gj+uteCzKrBKM3ZXcDE5ipTs2y7X8padoviUqZIsZ+GYl S8TW5S2Re8KbTtgXFkO/QUmOeYA1jSqeBLTFdLK+X74W1s+26f8NZYSEZWhy5G51n58Z 01cv7vRlz2Sbj1QLwIjWf+UuMOVkPH5ta7bkrU1F8qsioulXbmAcRpZa2FYL2c/u5S8A Was4Hc6xgFGmxXfRATKRgy43vFGPYs0LWP5lZWZbmxaJqE+32w82FivDzzeE0GoCxwz1 G7Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PBeiAFj8; 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 e15si22570316pgg.281.2019.01.29.04.39.04; Tue, 29 Jan 2019 04:39:21 -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=bombadil.20170209 header.b=PBeiAFj8; 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 S1727939AbfA2MjC (ORCPT + 99 others); Tue, 29 Jan 2019 07:39:02 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55428 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfA2MjB (ORCPT ); Tue, 29 Jan 2019 07:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=hcUmsWqOlUZoA0tGVtVxZVeGi9/WntceTQMLGURqW8U=; b=PBeiAFj84XF4ohPPYvNWj4Frx zy33xge/EQv0zpd59PDLm9VtSeIzpXE/lJEW4322H3P7tFLk4zvJP6dZ4NEifr60zfHbqnunPMmh7 BNEYVN7SeJ/JCiD5JBo3xBvAF9RI/9ho2qVbgzxCcw6ZhcIBUooP2sen9hW8s1fkr46WXVF8hVJlj a5nWrftCspTUGFGV3K0hjkbch5lEitgg+JzHUbTusZps2AsgxgAaYnQ5ToQnDYoMaaPIXiscx/v+o t6qBu0lTsYS/Iq+N4raF0oQZ+VLiBr7q1ajxAP7N6NplyLoU7Zvns33ALWYK968MQoCR7KZslxNfw CmIApdPvA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1goSf8-0003BI-LX; Tue, 29 Jan 2019 12:38:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0A4FD2042CFA9; Tue, 29 Jan 2019 13:38:44 +0100 (CET) Date: Tue, 29 Jan 2019 13:38:44 +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: <20190129123843.GK28467@hirez.programming.kicks-ass.net> References: <20190124211518.244221-1-surenb@google.com> <20190124211518.244221-6-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190124211518.244221-6-surenb@google.com> 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 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_.