Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4972442imu; Tue, 29 Jan 2019 10:33:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5uKyh91mA9pSJBxtRucJHRcpymg59w+t8pCSYPPZ3RyOnprpc0kZFMrDY5umvF7rMzj48O X-Received: by 2002:a17:902:848d:: with SMTP id c13mr27294304plo.257.1548786831765; Tue, 29 Jan 2019 10:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548786831; cv=none; d=google.com; s=arc-20160816; b=Q+bjTGvBMOmD7OZehpnjDm/vdVchoXIqrNzTBH7g1iDJn7HWk03FvZvXDN1fh2LCSX bitVKepwaJtUmlTg6MQJd6sIWFe6u6UxhGpLqL1j2F7icXUBOL7QL+tIKa/yl2TSIQyx cG7UuPhU8VRfsuXXBc71+8UtBQLVrMbp8ir19wM3OUeKkuck/PLMWbZGqipjhqfxnWn+ ii0m02gcU0NqR9WxEyUZvXqtwiNAmOL/cLofGrEk3LRWmpGYV1te5eI5MO/0SL36AS+1 aCUq3Qd/6NTd2R+CDtOX37ojE7HWH+Umi6AwDiI2eLCy9w3H5bd8+AYo2tdakKqytBcR XgyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0m3skRRv8gGXarJnQx7v/9n5i4k4SmQKxcZwANz4wvY=; b=u0mNuMxYB8IkWL+11Hrv+uJjT7p//yMb13fPT6+3qSCXkyMr5g54Ju6ob/PneeB2BI IUERD9SDjNMgLH5NlRNMwzwlVaNEnzQbU4UDz5Eb1M+nD29CnXbYFejF/AHZcP5tvk6i 3rbxOFRQZVNSkijOFByOqBz2NKdFrb7hn375QuKnUuYgagcOQqi2sxuzpgTSb917EtHR ZmWL1giuJCG7IxjTy27w9ig0OrZbnXJ2IamODmvtdSSG57dYWrhTiVGNb7tkDuiN0zve 0ko6BJj3QBtfHA+NEGMGhR83LGocgjYwkbe7eowHBa820E6x3LHO1sqHa7jLYRgQuqNK R/cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="J+vXHO/c"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r137si8654631pgr.395.2019.01.29.10.33.35; Tue, 29 Jan 2019 10:33:51 -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=pass header.i=@google.com header.s=20161025 header.b="J+vXHO/c"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728627AbfA2Sbx (ORCPT + 99 others); Tue, 29 Jan 2019 13:31:53 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45187 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbfA2Sbx (ORCPT ); Tue, 29 Jan 2019 13:31:53 -0500 Received: by mail-wr1-f66.google.com with SMTP id t6so23186284wrr.12 for ; Tue, 29 Jan 2019 10:31:52 -0800 (PST) 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=0m3skRRv8gGXarJnQx7v/9n5i4k4SmQKxcZwANz4wvY=; b=J+vXHO/cVQyn/1ZJqpK6skQGqPQVpUQSFTHNxOQ/z+6XxcF12Z91kemu2Nn9BKNMUz VP2EBsuvQUqdG6OJx/S2GiAKnWo+P7aQJs+XX8IYSA27JNRhIyd5zPGOuA4KgMsq7Kee QiadlZ0vaoAxeOniQYEFw+UqJTxEOOafgjs+b2yXFkK417Qtr48IV6RG7VIffB2j+Njb c7cVImBJqH3RrxBu4gbUXHt5GgzGTblW6m3mg+uCtQfvUNk0vGUqQKmZ3QJ8lvIbM0cH QoErGjgId+U39N2tUYBt2csNLu2AJeqjLyj3WU/Qlx6fW9iBFyqFB9iWtV5dL84G55L8 HcUw== 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=0m3skRRv8gGXarJnQx7v/9n5i4k4SmQKxcZwANz4wvY=; b=pFprfKmjgwMAGrlyqy/ilLQwnH6RnFtJftbt6Fspl3CRkojue0+XlmyGQRA1OBv+v0 pfgtB+k0npr1idVUgyNWQdFfxQlduPMit7Yc7UDhguzEILYDiJKwRAKe5uuvR68gv4t8 oyzZHvMINWv9aA7nG90LEht0KHCe0WYE/KquO5ZV7nCsyZiJnjG78J+VZSHua8CcwFJ3 mBqS185Yb5g6s3aQujXnMoagWjInSTg7/opGTUB+lb/IZ/Sp3K6SfMILmwuD1RESdwZw lBmj99c1TALfldA0SuUO0zjbelVQTXtlJWutJgSRco2rDE7giHzJqxhGAHkLtb0U9wh3 GIYQ== X-Gm-Message-State: AHQUAuaB5EaxiW7KSeG8esI8qPE0DM55nz+1q/l8vz0/RrXsojDC4TvR O11IU2RLcFkEMCFQlvhfiazqqdKnzmz91eP1vfIytw== X-Received: by 2002:adf:dc4e:: with SMTP id m14mr7291068wrj.107.1548786711280; Tue, 29 Jan 2019 10:31:51 -0800 (PST) MIME-Version: 1.0 References: <20190124211518.244221-1-surenb@google.com> <20190124211518.244221-6-surenb@google.com> <20190129123843.GK28467@hirez.programming.kicks-ass.net> In-Reply-To: From: Suren Baghdasaryan Date: Tue, 29 Jan 2019 10:31:40 -0800 Message-ID: Subject: Re: [PATCH v3 5/5] psi: introduce psi monitor To: Peter Zijlstra Cc: Greg Kroah-Hartman , Tejun Heo , lizefan@huawei.com, Johannes Weiner , axboe@kernel.dk, dennis@kernel.org, Dennis Zhou , Ingo Molnar , Andrew Morton , Jonathan Corbet , cgroups@vger.kernel.org, linux-mm , linux-doc@vger.kernel.org, LKML , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" 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 10:18 AM Suren Baghdasaryan wrote: > > On Tue, Jan 29, 2019 at 4:38 AM 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_. > > Oh, I didn't realize that. After reading the following example from > atomic_ops.txt I was under impression that smp_mb__after_atomic() > would make changes done by atomic_set() visible: > > /* All memory operations before this call will > * be globally visible before the clear_bit(). > */ > smp_mb__before_atomic(); > clear_bit( ... ); > /* The clear_bit() will be visible before all > * subsequent memory operations. > */ > smp_mb__after_atomic(); > > but I'm probably missing something. Is there a more detailed > description of these rules anywhere else? I was referred to memory-barriers.txt that explains this clearly stating that "These functions do not imply memory barriers.". Thanks for noticing! Will change to smp_mb(). > Meanwhile I'll change smp_mb__after_atomic() into smp_mb(). Would that > fix the ordering? > > > -- > > You received this message because you are subscribed to the Google Groups "kernel-team" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. > >