Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4965682imu; Tue, 29 Jan 2019 10:27:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN4YiJja1gMzcNqULpUSSpoqT51CJ5x95U13eB+R5OBb5sGe0ATc5S/AiSQYrWrJOmqhshGU X-Received: by 2002:a63:554b:: with SMTP id f11mr25347793pgm.37.1548786429194; Tue, 29 Jan 2019 10:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548786429; cv=none; d=google.com; s=arc-20160816; b=wagG/rJqO7HIX7VKuvRfJAA7ss1kEuXE4h17YSD1YbEuWo7JAtG6j95XkxYnFTqHjC J46gr4Jk6HZ2r5Lkq7Ubdc/YpNnvkzWPTn+TfbusZ3Khjswru5Urf+1daiOyY8BUdLVB pGrgN8tDRrmexCOftd1xASzc4gIFe76A840rDxTZAP9ENIPTa57ZKQcAOmttLwQGZoT2 7hJEEvvrSkg/HG8k4Y6cBs7f0WXXwJVhxz9PneZXz1f2FxsnxYYtZLNOmkrfxpl+sfze FGLjE94NHhdDQaDJYcOvgywU/LBAL4jKceI9WGj9FMbXekPbyQPiaBXdg+vyCYaXiZ9n QIXQ== 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=ADwM0lszvaqhduF5I3DNeFvWPeUQTXjMtjOQKUDAPJ8=; b=Lp9PWDRG3dCF7gN0RX8JLMHBzHnoTEcuQljxah4eLcNui3yerPvvN8ZNDPAkL1Wr27 7AJ6sdw5tzBdueX+hX1R8eq/GEMJLIVXS3qKhYENGL6f0ulRngXQnuiCDy3E0PYb/sDA sPo273z5QOex9Xjv8QEx92FhfFNpMkiqR5BFJKj5Zvaeaaj3J20VKnknonC5drVhM8Dn lH5Z27lwyhrElzCFhMyawzGImaae8kY6sJiZbVEB4a0o9oZA/qtgyqcycAW+b9fgd9ep leycv3dUGTF2vZ9RaTxuYi884UqAnPE5+oZHFCeAqsrTQy0bj4ViDlKfydNo0ZB3C5o+ Z2UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BXh7n98B; 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.26.54; Tue, 29 Jan 2019 10:27:09 -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=BXh7n98B; 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 S1728907AbfA2S0N (ORCPT + 99 others); Tue, 29 Jan 2019 13:26:13 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46103 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbfA2S0N (ORCPT ); Tue, 29 Jan 2019 13:26:13 -0500 Received: by mail-wr1-f65.google.com with SMTP id l9so23138091wrt.13 for ; Tue, 29 Jan 2019 10:26:12 -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=ADwM0lszvaqhduF5I3DNeFvWPeUQTXjMtjOQKUDAPJ8=; b=BXh7n98B5xjbeB+aql7MNs/6BjRNZglzr66LB5d1zE4A4IXStoeq7g7volggkOR0jm Zw4Ew6E/Mn8x9yOekTa6e3ZeVuRcso8aX3m5+bpoW/SbRmwVAh7PW5CHhPa3QjTpqSWI uLYmSvffhC1lccnslt+fRVgCkeoPzinyOXdqCHzx03/tGID0YwW0bRIT+fsW57P472hY dIksMeGK073m5vEA30nAIeiNKStj7FtgFsaObHsW4CFEy8wMXyPrYI4K27+VKVl2sh9y MmAVuYcOhROvZCyChKdV3QsAE741Ix5ZmCqCkX3aa2Jdi2RMb+Cwe5vou1Ftliov/taq +Hdg== 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=ADwM0lszvaqhduF5I3DNeFvWPeUQTXjMtjOQKUDAPJ8=; b=YHzVJ1c6IIGmWbqgKiJK7iGfzYniNpwO+/MnN6yY6gdilGvx1apKHlcwz/V+CSbfGV I0bGph5Qxc9ogf2UCDN0TAx+aiJ14lFh44KtziUZVOnD8XWVnyNpmjtS29F4LWJB651U Zzao5a5bgNmWoR7UE4KAx5KReIKMnKCrLprs9D9nP6dt4VRfT4M2L6hAiQKcdNIhCn5s HR+kknddAjODX/+fiZFLqniY65enTxh9uoougsa/6FbCuHTrrLARIv5na1MpX5O3VNgR XPUFLSiReWzdEBWUidlYAUkMPF7LuHu+W0Fss3moDnJNw3ATfP+phGg43HMVnevL7lRB +35A== X-Gm-Message-State: AHQUAubA08FghZMKpXI/NJ8W6RDqsoYZImdp0IsD9mub0WbhG7GLkrXV claXhJDL2PzsKIQebnYRphMrn86IYdtw2c+PmiLCAQ== X-Received: by 2002:adf:dc4e:: with SMTP id m14mr7274623wrj.107.1548786371209; Tue, 29 Jan 2019 10:26:11 -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> <20190129151649.GA2997@hirez.programming.kicks-ass.net> In-Reply-To: <20190129151649.GA2997@hirez.programming.kicks-ass.net> From: Suren Baghdasaryan Date: Tue, 29 Jan 2019 10:25:58 -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 7:16 AM Peter Zijlstra wrote: > > 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. Got it. Will change the comment to something like: Order group->polling=0 before reading times[] in collect_percpu_times() to detect possible race with hotpath that modifies times[] before it sets group->polling=1 (see Race #1 in the comments at the top). > -- > 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. >