Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3794391imc; Thu, 14 Mar 2019 05:34:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYPEZl8SnAyedzrUDZuNNEuM6CxZKplwvNKpAQpRJlAgXzXp0omErun9EIqYqXAd0g/z8m X-Received: by 2002:a17:902:bf0c:: with SMTP id bi12mr31415781plb.340.1552566873743; Thu, 14 Mar 2019 05:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552566873; cv=none; d=google.com; s=arc-20160816; b=Z0D7YpfyqEGwu0pgfmimETgJ11UIBNnfkaQ7knimsAlxzOWnVaZnTlQnO6Vx78CfYX vlgDWOgyYOFzZX891344jGL+rtHj6s40+YK/K/vXTvoA1pVhRHdyGvf7Am+fb0EjvhHL tkdACIqqTFFE4aW/x7yD+4UkEuN70yueqo2xbp3RS1Sq//+yJkY/Dpn1p/Ds4NFDB58U EuE715dmJoPQIxjHbG/p0RXZgqpCvB4M1hQbLJQ8f3VOjRDVcorffyI47IMIP8MEWCq1 q6JlrzxGUpCrW1UsEhHHJfFLCpgNRpFpxkoxT/62lRQ50Yl3REAGdfaasnexgeUii0bo LC+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O66kdQXOarCKUq+1dTsJapp3SRZV9kBKqR1827U6s04=; b=G2tasPnvMvhmT7cQeKG4tpav/517my4sd4kXRBfUNNteB36WKBGPbtowa9lw9GGCf/ xtkK6RxvDcI9XWmjB2lnSC3Dow+wtrb+235acYyo/wfsuEuYxrNQwNGtgUQzhanVwE0t AXfKc+L5SuAQLXv9/B8V98PMucr3QInR/Tfaqi9c8096K/JAJeDUhGwpRwAmAuKZ7a0U 2Ab740xWgt31h/1WxyVlWeraM4O4DdCSMwaQIiQXSUQPwJL4RZybh+L1kHp2j1lVUiVv lF0f0bXoAp8sLZhapBPKj3VQHlUOAQX5tfyb2bxGMvChYCcaFO3a8jA+x0TWxFG6QY7k IWPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b="WI0Ab/Ds"; 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 p26si3276806pge.541.2019.03.14.05.34.18; Thu, 14 Mar 2019 05:34:33 -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=@joelfernandes.org header.s=google header.b="WI0Ab/Ds"; 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 S1727582AbfCNMcD (ORCPT + 99 others); Thu, 14 Mar 2019 08:32:03 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37055 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726697AbfCNMcD (ORCPT ); Thu, 14 Mar 2019 08:32:03 -0400 Received: by mail-qt1-f194.google.com with SMTP id z17so5767223qtn.4 for ; Thu, 14 Mar 2019 05:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=O66kdQXOarCKUq+1dTsJapp3SRZV9kBKqR1827U6s04=; b=WI0Ab/DsGrEhdwbVVwi0LnEbCEhAoOtBS3VOhkq741c/7SSDRV1FAlGiMpb0HDNzGe 8kns1g5wLVWmszHIfIIy7Hn4GCTz81I1NDfxjnDroXIj9xzWRTHyaHlSm0CmtUjztynZ J64v7JmeQrFkDvsmLbZLKtHi0WMdXNELq81Ow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=O66kdQXOarCKUq+1dTsJapp3SRZV9kBKqR1827U6s04=; b=VxxpuUawZmlfMv9dbNrek8zDBQzSm9q/o9vpJBtGYll/pM5M/1H6UcmLxvaUjujjHz DkWbYV3N3i71hk8eZYOb8J4MH+JstaLVtfLFAMHIR0IwNP12Y797T4a0+857mvb5k+MD /nmxF6VCH/sKaxd/iX7p+FZ47XLVlyZqwVwM/wC/odBBzbgG1ivbIvogI+OKc16BCysm QQ5UMZSXLCj9V+cgA5Ynu6MDpbNIbuH+US4mzaFwjWp6KhuOV+rK9AbkSK27iyPSbxmL zjRzVM+DLIlsJIvQNdnb9J6tLJep+yJUXNfqzkvd9HACjZrT3oQkjRMuIzWkfjcTcljV 1UMg== X-Gm-Message-State: APjAAAUoZhCF4pyCkQBEs1/9fBwkivThENDZ7lrNwL3iVjpRQ9ol7mx3 lTN1C5ISmKNg76NW7p2w/4u9oA== X-Received: by 2002:aed:3c75:: with SMTP id u50mr16356617qte.128.1552566721707; Thu, 14 Mar 2019 05:32:01 -0700 (PDT) Received: from localhost ([2620:0:1004:1100:cca9:fccc:8667:9bdc]) by smtp.gmail.com with ESMTPSA id y11sm11872148qky.2.2019.03.14.05.32.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 05:32:00 -0700 (PDT) Date: Thu, 14 Mar 2019 08:31:59 -0400 From: Joel Fernandes To: "Paul E. McKenney" Cc: Steven Rostedt , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, luto@kernel.org, byungchul.park@lge.com Subject: Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts Message-ID: <20190314123159.GB101545@google.com> References: <20180829222047.319-6-paulmck@linux.vnet.ibm.com> <20190311133939.GA29747@google.com> <20190311222903.GR13351@linux.ibm.com> <20190312150514.GB249405@google.com> <20190312152034.GZ13351@linux.ibm.com> <20190313150948.GA84821@google.com> <20190313112726.01d974fc@gandalf.local.home> <20190313155155.GN13351@linux.ibm.com> <20190313125125.1a1fb2f3@gandalf.local.home> <20190313180730.GU13351@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190313180730.GU13351@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 13, 2019 at 11:07:30AM -0700, Paul E. McKenney wrote: > On Wed, Mar 13, 2019 at 12:51:25PM -0400, Steven Rostedt wrote: > > On Wed, 13 Mar 2019 08:51:55 -0700 > > "Paul E. McKenney" wrote: > > > > > Does this mean that there is a better approach that Joel's suggestion? > > > I believe he would end up with something like this: > > > > > > WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && !in_irq()); > > > > > > It would be nice if there is something like this: > > > > > > lockdep_assert_in_irq_handler(); > > > > > > But I haven't seen this. (Not that I have looked particularly hard for > > > such a thing, mind you!) > > > > That would be trivial to implement: > > > > #define lockdep_assert_in_irq() do { > > WARN_ON(debug_locks && !current->hardirq_context); > > } while (0) > > Looks good to me! > > Joel, does this work for you? I could be wrong, but I suspect that Steve > is suggesting that you incorporate the above into your eventual patch. ;-) Oh thanks for pointing that out. Yes it does work for me. I agree with the lockdep API addition and others could benefit from it too. I will incorporate the lockdep API addition into the RCU patch, but let me know if I should rather split it. thanks! - Joel