Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3029537imm; Sun, 5 Aug 2018 19:08:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc+4W5lC66x3HyveNx3dGDoZKaYMpB4gfL/F80nvM/mlYzroY/wyalan+zfPmK12etlzWUD X-Received: by 2002:a65:428b:: with SMTP id j11-v6mr9287377pgp.200.1533521319168; Sun, 05 Aug 2018 19:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533521319; cv=none; d=google.com; s=arc-20160816; b=cQtWaR5V9ekGyr/FPCXD1zjBjMYFM556anmyntIo39hHPw9z78P7MT+ciV1TDi0coR DzWlfh/YK1FYq/gqhNtlwWrKfOQpR2k4pr7sQLJ0eYAm2rJt5/NHCWAus6vkf3BsBQ7/ 8tuJ5n/Id7YLoRtpT5+FhvPOElaEJ0Q6soztICGv0k1+FaHyC9azswS/0aKg+knsJG/t oybTOr9WmuyyU/aBDPetm9WQv9u8wGC/RISG96xZb/TvOqq56XdTKXEUg7GzSB4Kw1r4 hQ2IpTGnLIn+1DOKQepPa4YVq7QtET5AqPuIBISR++Ygeq5jP/tDhazKxsAww43CIThx 1nig== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=Tr5NZqqemwOpDEH6RzrBqejeZolZmUG2rmdtC9Dd+3U=; b=PeWU5qX3Pn6Ksu2GKBaEEEAHQVPEvl+EJ29XWRbN79489RogLAKQoR95LKlhxS+G3n qYi/wap0/98/Q+KsR/ETpZBoXver36hlOlW1N23AlarEAbWW+IJ46iDmVe4QqZiybMi7 k4oA7cp8rVP/94vmf4Bbli3adPN80gyLpjVokNJOr9Tp6Y0eCsGCaIxcPx+ZOew2RVwY wWSaLriA8WEY2cwyBi/vjaAbYvYgy1UkI1QXC7HcN10amGznjywEi5INjHUSv4mSlk3q HPcBA949G60kFgA4CVaO/JKeOAsCTh85eHj5uLiBtWdqsNAi+IuderQZZzEs6+0wn/B7 jxRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZKkTUvzG; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23-v6si12148886pgb.623.2018.08.05.19.08.23; Sun, 05 Aug 2018 19:08:39 -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=@kernel.org header.s=default header.b=ZKkTUvzG; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbeHFEOV (ORCPT + 99 others); Mon, 6 Aug 2018 00:14:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:54578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbeHFEOU (ORCPT ); Mon, 6 Aug 2018 00:14:20 -0400 Received: from devbox (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16646219C9; Mon, 6 Aug 2018 02:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533521254; bh=TiMByG+RGH9jlUXoiz1XVA9FnO/yKAfGsMpS9EhxoWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZKkTUvzGFHIQsobDxhKtZyTN9kPyGnTMlG7V9DK1dQsQa/2z0OSg1fD+CqM6FDum6 eQrmdius79MO1m1vEuxlpp0ohdGaXv6Rtl85L35vsAiArCShg26Ek/qaibQa/KaLoW Vel57v+1JQu+SXaGlxyLfkJzVc9qYjyBIjchDNZA= Date: Mon, 6 Aug 2018 11:07:29 +0900 From: Masami Hiramatsu To: Joel Fernandes Cc: Joel Fernandes , LKML , "Cc: Android Kernel" , Boqun Feng , Byungchul Park , Ingo Molnar , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Peter Zijlstra , Steven Rostedt , Thomas Glexiner , Tom Zanussi Subject: Re: [PATCH v12 0/3] tracing: Centralize preemptirq tracepoints and unify their usage Message-Id: <20180806110729.fc79c61d5208cf642e223e90@kernel.org> In-Reply-To: References: <20180730222423.196630-1-joel@joelfernandes.org> <20180802235527.ddb0d1837154e3f98571b3b0@kernel.org> <20180803162340.32b4b3fde55a4f5a5c28b425@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 5 Aug 2018 09:46:56 -0700 Joel Fernandes wrote: > Hi Masami, > > On Fri, Aug 3, 2018 at 9:51 PM, Joel Fernandes wrote: > [...] > >> On Thu, 2 Aug 2018 19:57:09 -0700 > >> Joel Fernandes wrote: > >> > >>> Hi Masami, > >>> > >>> On Thu, Aug 2, 2018 at 7:55 AM, Masami Hiramatsu wrote: > >>> > Hi Joel, > >>> > > >>> > I found this caused several issues when testing ftrace. > >>> > > >>> > #1) ftrace boottest (FTRACE_STARTUP_TEST) fails > >>> > >>> This sadly appears to be a real issue. The startup test for > >>> "preemptirqsoff" tracer fails, however it passes for only preemptoff > >>> or only irqsoff. I tested only the last 2 tracers, not the first one, > >>> that's why I didn't catch it. I need to debug this more. > > I figured out this one too. Its because I need to account for > preempt_count() in tracer_hardirqs_off since the tracer probe is now > called with an additional level of preempt disabled from the > tracepoint code. Without that accounting, stop_critical_timings may > not be called causing an empty trace buffer. That should be easy to > fix, I'm on vacation though and back on 13th so can most likely look > at it only then (the week after the next). Nice! Thank you for identifying the root cause! BTW, I'm also on vacation this week :) > >>> > #2) mmiotrace reports "IRQs not enabled as expected" error > >>> > #3) lock subsystem event boottest causes "IRQs not disabled as expected" error (sometimes) > > The only thing left to figure out is #3 ("lock subsystem event > boottest"). Could you let me know how to run this test? The #3 is not always reproducible, I just enabled these 2 configs CONFIG_FTRACE_STARTUP_TEST=y and CONFIG_EVENT_TRACE_TEST_SYSCALLS=y and boot on Qemu. I have seen this issue about 10% of system boot. Thank you, -- Masami Hiramatsu