From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95E3AC2D0A8 for ; Mon, 28 Sep 2020 23:20:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65303206C9 for ; Mon, 28 Sep 2020 23:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601335240; bh=nVv5eFMhZxzuUjz/hzt1MJOVFmdQT3QVpGthmSQf4Tg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:List-ID: From; b=uZ4bsVYbwSIXTIdS5605TcxTQYjQthbEBfigjjdUlhaHfl7SAnRf55rk9jjgpRIki yANFNME37w0GN+7Z9CYgOnEENFPnKaX1ixFwASaneoqHthSXZ3VyPe31s2AmrP7Dkn FaNZx9l8mSKBBHXhCqfsLm5P37HBb2l3DRmOXh5c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbgI1XUj (ORCPT ); Mon, 28 Sep 2020 19:20:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:42854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbgI1XUc (ORCPT ); Mon, 28 Sep 2020 19:20:32 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (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 05DD823A52; Mon, 28 Sep 2020 22:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601333727; bh=nVv5eFMhZxzuUjz/hzt1MJOVFmdQT3QVpGthmSQf4Tg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=na+DVtNqqzotWjIjIDUhDtGn4eiWCgc7gW9oZFsQJx1nI/IB9WSmHnqpJPLYWSuWy u7FScVx5yydPbLyz4zv8VDlRks/l75WDA0dUQB9SFckbpcdY8keaFkCyePUdrgloql TpRbxMDidOiQIP1/FWVt3+roJeQci+NOzn2Wx3kQ= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id B051035227DB; Mon, 28 Sep 2020 15:55:26 -0700 (PDT) Date: Mon, 28 Sep 2020 15:55:26 -0700 From: "Paul E. McKenney" To: Kim Phillips Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Thomas Gleixner , Alexandre Chartre , Peter Zijlstra , x86 , rostedt@goodmis.org Subject: Re: [tip: core/rcu] rcu/tree: Mark the idle relevant functions noinstr Message-ID: <20200928225526.GR29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200505134100.575356107@linutronix.de> <158991795300.17951.11897222265664137612.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 05:22:33PM -0500, Kim Phillips wrote: > Hi, > > On 5/19/20 2:52 PM, tip-bot2 for Thomas Gleixner wrote: > > The following commit has been merged into the core/rcu branch of tip: > > > > Commit-ID: ff5c4f5cad33061b07c3fb9187506783c0f3cb66 > > Gitweb: https://git.kernel.org/tip/ff5c4f5cad33061b07c3fb9187506783c0f3cb66 > > Author: Thomas Gleixner > > AuthorDate: Fri, 13 Mar 2020 17:32:17 +01:00 > > Committer: Thomas Gleixner > > CommitterDate: Tue, 19 May 2020 15:51:20 +02:00 > > > > rcu/tree: Mark the idle relevant functions noinstr > > > > These functions are invoked from context tracking and other places in the > > low level entry code. Move them into the .noinstr.text section to exclude > > them from instrumentation. > > > > Mark the places which are safe to invoke traceable functions with > > instrumentation_begin/end() so objtool won't complain. > > > > Signed-off-by: Thomas Gleixner > > Reviewed-by: Alexandre Chartre > > Acked-by: Peter Zijlstra > > Acked-by: Paul E. McKenney > > Link: https://lkml.kernel.org/r/20200505134100.575356107@linutronix.de > > > > > > --- > > I bisected a system hang condition down to this commit. > > To reproduce the hang, compile the below code and execute it as root > on an x86_64 server (AMD or Intel). The code is opening a > PERF_TYPE_TRACEPOINT event with a non-zero pe.config. > > If I revert the commit from Linus' ToT, the system stays up. "Linus' ToT" is current mainline? If so, what does your revert look like? Over here that revert wants to be hand applied for current mainline. Thanx, Paul > .config attached. > > Thanks, > > Kim > > #include > #include > #include > #include > #include > #include > #include > > static long > perf_event_open(struct perf_event_attr *hw_event, pid_t pid, > int cpu, int group_fd, unsigned long flags) > { > int ret; > > ret = syscall(__NR_perf_event_open, hw_event, pid, cpu, > group_fd, flags); > return ret; > } > > int > main(int argc, char **argv) > { > struct perf_event_attr pe; > long long count; > int fd; > > memset(&pe, 0, sizeof(struct perf_event_attr)); > pe.type = PERF_TYPE_TRACEPOINT; > pe.size = sizeof(struct perf_event_attr); > pe.config = PERF_COUNT_HW_INSTRUCTIONS; > pe.disabled = 1; > pe.exclude_kernel = 1; > pe.exclude_hv = 1; > > fd = perf_event_open(&pe, 0, -1, -1, 0); > if (fd == -1) { > fprintf(stderr, "Error opening leader %llx\n", pe.config); > exit(EXIT_FAILURE); > } > }