Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp340613ybv; Wed, 5 Feb 2020 06:31:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzzJljqsMFEMxmdH+f0cGXpBnimSGJzexosMT51k0SZxch/s6GsnMmuMUTFXd5vDTpT+AAs X-Received: by 2002:aca:c5ca:: with SMTP id v193mr3046688oif.77.1580913086863; Wed, 05 Feb 2020 06:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580913086; cv=none; d=google.com; s=arc-20160816; b=CgSmQGFHbzKXBeSaeYbh12+ZuY9gq3ouoMYiU07RPRBAdbgjVXb2qX0LN0nFx0RRc/ TQfBYRC0X8XhrGR3MMvyBemyehrN3GjfpWBNHtu7FfhmWq+DY+bF90/SBr5D1zT14DNf P8z9zCM2vDTL07MW3V1px7ET3BZ9THgV+Zq0PYGgUO/Utgh+tP9Pr9/R6Pl3+Jqjhm61 rJxsYKg2sDO8iArM8oE5miiKxnRfqUngFbyCBK1aiNSMhYG6kwoYfsB4SPYArDmsRDyY xXG5063/d7jh7h7CszCP10WQowD9nbtDn4Xsesj2Xue3lyxr88IYLiUKnAFIXP6Zlm4z zwPg== 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; bh=ak+V9wLt60ywWp56R9bFNBKhOAOfz9SgociQPEWH2pY=; b=ZqGEz69mGfy1BZy1z5sdyNoXHSIk6hAK6FSDzr7epmoAEyBJPKWIMllTMhl1vWWmhm tnQwiLST/pfSGmsF6IjUkyhcRjUOb/P++C9aRgC/olGCh35N78IA4cXb2ICXM2xDW1ao OXzsnVcqtORieTpm+rmmfJk0pSIiRxZ7tqu+oCvm+qyHpMmCOrVzEXcqj1lrrreD3Tqr sJIWf5fer8/Ei7ZEd9BGYDulX33WZtPn7dHCXxzquWfsJvfjvXjuoGgobrNWDuf6p0Nb P5q5uA/mRrauNBJL47/Fj86eXMM/NpnHR/8B8Zz770pI6GSxMHooWaqyY/T96HiXJy3t GwgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si14286866otj.0.2020.02.05.06.31.14; Wed, 05 Feb 2020 06:31:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbgBEO2y (ORCPT + 99 others); Wed, 5 Feb 2020 09:28:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:60324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbgBEO2y (ORCPT ); Wed, 5 Feb 2020 09:28:54 -0500 Received: from oasis.local.home (unknown [212.187.182.165]) (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 5600E20702; Wed, 5 Feb 2020 14:28:52 +0000 (UTC) Date: Wed, 5 Feb 2020 09:28:47 -0500 From: Steven Rostedt To: Joel Fernandes Cc: "Paul E. McKenney" , linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Amol Grover Subject: Re: [for-next][PATCH 4/4] ftrace: Add comment to why rcu_dereference_sched() is open coded Message-ID: <20200205092847.0b650972@oasis.local.home> In-Reply-To: <20200205141915.GA194021@google.com> References: <20200205104929.313040579@goodmis.org> <20200205105113.283672584@goodmis.org> <20200205063349.4c3df2c0@oasis.local.home> <20200205141915.GA194021@google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-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 Wed, 5 Feb 2020 09:19:15 -0500 Joel Fernandes wrote: > Could you paste the stack here when RCU is not watching? In trace event code > IIRC we call rcu_enter_irqs_on() to have RCU temporarily watch, since that > code can be called from idle loop. Should we doing the same here as well? Unfortunately I lost the stack trace. And the last time we tried to use rcu_enter_irqs_on() for ftrace, we couldn't find a way to do this properly. Ftrace is much more invasive then going into idle. The problem is that ftrace traces RCU itself, and calling "rcu_enter_irqs_on()" in pretty much any place in the RCU code caused lots of bugs ;-) This is why we have the schedule_on_each_cpu(ftrace_sync) hack. -- Steve