Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1068409ybe; Wed, 4 Sep 2019 12:03:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyycQGle+KsJwCNhW1dwv/uzUU+VWQb4Bx+oNxPcY+VcsLgq7WmVGCxwGEtFmuxQC3p9YNN X-Received: by 2002:a17:902:a618:: with SMTP id u24mr12862166plq.342.1567623828252; Wed, 04 Sep 2019 12:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567623828; cv=none; d=google.com; s=arc-20160816; b=syO0mElZQvs6MdfUTWSA+MVeMX/7KLSEAhHeY4uWguZS9M1t4hKW4U+sUEeSE4AtM5 7J1ZvUjiBzYpx7xllgWyoXPOl3AGX6XT65rMBV1d9XTAAx4ksd2/jcnrOoKnhJN/YOnN 5MAYXFQWl2sIFtyt0bTW/JLLsPAPDNRkC9ou0M1yol1SdQfwKOIokyAtJMJ2PAzFLlvy 5RiarbGvAVNtsXReNhMt8aRQywkqIm4EtaHtZq4c41nUAwyfUQbz1fUss9FS126B3rh0 1CQey5LetXbukswSSsze2XQgfTyQ/Qlx+AzkIt3AG8QiGGzkiAZ/wSHsmUctx6Sv+sCR +Hcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=YS/oRA+KV/UBzoz/WnnIu9hGtCWMQgkzh1fKr4+obk0=; b=j528ac5UYHKWQ/S9rYvwA4GRpnUvAhhzeDmNghIwM9nIhZEcniRvgqKy+b5qQr3WR/ 0CL6yH/5JqHzX2HmLTR8+LsoW6ebbVHy9dpH6rqf5P94iUh78CDI9p22ZnMpSauxGog/ B/2c0Vkp0d3+KqhPqhaakxkSRWp1ZoLyR3zUanTFZMjvSmdZVjeqqE7WfKJEWn2wsB5I 8cYLmzog1gVc/eEaC1jGxq+uNmDj3fUjj13byxv2csjYBeXZjcz60beCsX/9uOd6+iLq 9SZO5zRItnEjNTM6IgagstNNwN9beGvlEa0WLIeIv6VUlnzbU6Fz65JKFWzG4/WraO5V h7/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WoWlN9yx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62si3011983pjg.37.2019.09.04.12.03.32; Wed, 04 Sep 2019 12:03:48 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=WoWlN9yx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387957AbfIDTAj (ORCPT + 99 others); Wed, 4 Sep 2019 15:00:39 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:38901 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730410AbfIDTAj (ORCPT ); Wed, 4 Sep 2019 15:00:39 -0400 Received: by mail-io1-f68.google.com with SMTP id p12so46678213iog.5 for ; Wed, 04 Sep 2019 12:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YS/oRA+KV/UBzoz/WnnIu9hGtCWMQgkzh1fKr4+obk0=; b=WoWlN9yxWDFjkBERDEvSZtnHj2s/6B92wbrXvUeunbJWmcdnO2QqghZnXrW2DQrZ8D 7Be9aVcLZ0OVYxDnq7dBhIilw+oR4PZCWFiXsKbwzXhj+G40DVmH3FQnMzJlYzzJHOc2 ypFG3yTMilx5701aG1DxMYXRLMtBm2B3JybVTcpdxkXTnzgRA+T8KbEz5PqCi5zLA3aH vf8ta/AqS9n82mA0LdCNxoC82m8LNekvY/1RW01VUxir3YvJJH8ePd5NfKQCELrqdj3t g3aycJU6W3VqBGFVrRSXjaaJtsNNRCN8kNYKuYqmS2wbWMwXaf+cQ98ySSnFYaXxCdYg wJoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YS/oRA+KV/UBzoz/WnnIu9hGtCWMQgkzh1fKr4+obk0=; b=FMMKakyl6X8PjpmfkeGDwDVktxy5ejpcTf8/8hNyDkFPS+BTCHcUNGxiK31ozGFhLL Kt3EFMCxcYSEXf+kMk4jRMS3WQYwlInQJczp8z849HfdV6ULXBfWwccjLXhz6RHeQlee 6/uJYymYXWQStwalsQo8P4cL4RLLG2UmrY9eCkN79oZ8JUG/h3GFGKggU9xKoKH+VkQI OLJcnm4lBFYpzX5JAdIrIocJb9IhJs4uXfM0kMAPgnJfIblHDJltKo00zuhxwVLKTnBL 3m0M9O8hHjgm27Hj+FsCm/FM1m0+3LyN1o+w7pU9Ybfegvrx39uYYDb95DmgVVSMjuVd l2Zw== X-Gm-Message-State: APjAAAWdDghkduBOi7oeL7YQ/hnEA0oCHN8PjtQtizDeOjaqEmxk2Mql 3muyyZ9S9PfHfwqctMSE7g== X-Received: by 2002:a5d:8196:: with SMTP id u22mr9364546ion.280.1567623636995; Wed, 04 Sep 2019 12:00:36 -0700 (PDT) Received: from [192.168.1.99] ([92.117.176.185]) by smtp.googlemail.com with ESMTPSA id 80sm32670032iou.13.2019.09.04.12.00.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Sep 2019 12:00:36 -0700 (PDT) Subject: Re: [PATCH v5 1/4] ftrace: Implement fs notification for tracing_max_latency To: Steven Rostedt Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Joel Fernandes , Peter Zijlstra References: <20190903132602.3440-1-viktor.rosendahl@gmail.com> <20190903132602.3440-2-viktor.rosendahl@gmail.com> <20190904073915.4a145a91@oasis.local.home> From: Viktor Rosendahl Message-ID: Date: Wed, 4 Sep 2019 21:00:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190904073915.4a145a91@oasis.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/4/19 1:39 PM, Steven Rostedt wrote: > On Tue, 3 Sep 2019 15:25:59 +0200 > Viktor Rosendahl wrote: > >> +void latency_fsnotify_stop(void) >> +{ >> + /* Make sure all CPUs see caller's previous actions to stop tracer */ >> + smp_wmb(); > > These memory barriers just look wrong. What exactly are you trying to protect here? > > Where's the matching rmbs? > Thanks for reviewing. However, since these functions will disappear when I take the irq_work facility into use, we should perhaps not spend too much time discussing what would have been. There are no matching rmbs, I was thinking that the smp_wmb() would merely enforce the order of the memory writes, as seen by other CPUs, so that the tracer would be stopped, before the latency fsnotify is disabled. E.g. in case of the preemptirqsoff tracer the idea was that it doesn't matter exactly when a CPU sees the "tracer_enabled = 0;" in stop_irqsoff_tracer() but that it needs to be seen before the writes in latency_fsnotify_stop() are seen. best regards, Viktor