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=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no 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 1FBC8C43461 for ; Wed, 16 Sep 2020 21:10:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 995A9206D4 for ; Wed, 16 Sep 2020 21:10:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="akB9Q04w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 995A9206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 017526EB37; Wed, 16 Sep 2020 21:10:28 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3A6546EB2D; Wed, 16 Sep 2020 20:48:42 +0000 (UTC) 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 C4AE9206BE; Wed, 16 Sep 2020 20:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600289321; bh=QF1zQJP79WVPgC7BQeqDP3DZhHjaF5z1yd8g5M2I7fo=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=akB9Q04wZh3xRPtHQo3QuvPylihDbICVfThimNTeh+6Dq0zpizzibT3VdQC852Awd fuMHbK20SAzoAhLwH6t+euR5PcSNWcJa0SR4ujAxGLaUq8AJQAgfX4YxZ7alYezUvX j37+068f8IMjVrTrNXFe4dEm94w3+K/HU0qZ4xJY= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 6BBF33522BA0; Wed, 16 Sep 2020 13:48:41 -0700 (PDT) Date: Wed, 16 Sep 2020 13:48:41 -0700 From: "Paul E. McKenney" To: Matthew Wilcox Message-ID: <20200916204841.GC29330@paulmck-ThinkPad-P72> References: <20200914204209.256266093@linutronix.de> <871rj4owfn.fsf@nanos.tec.linutronix.de> <20200916192352.GO5449@casper.infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200916192352.GO5449@casper.infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Wed, 16 Sep 2020 21:10:25 +0000 Subject: Re: [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paulmck@kernel.org Cc: Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Brian Cain , Richard Weinberger , Russell King , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider , linux-xtensa@linux-xtensa.org, Shuah Khan , Jeff Dike , linux-um , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, linux-m68k , Ivan Kokshaysky , Thomas Gleixner , Dietmar Eggemann , Linux ARM , Richard Henderson , Chris Zankel , Max Filippov , Daniel Bristot de Oliveira , LKML , alpha , Mathieu Desnoyers , Andrew Morton , Linus Torvalds Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Sep 16, 2020 at 08:23:52PM +0100, Matthew Wilcox wrote: > On Mon, Sep 14, 2020 at 11:55:24PM +0200, Thomas Gleixner wrote: > > But just look at any check which uses preemptible(), especially those > > which check !preemptible(): > > hmm. > > +++ b/include/linux/preempt.h > @@ -180,7 +180,9 @@ do { \ > > #define preempt_enable_no_resched() sched_preempt_enable_no_resched() > > +#ifndef MODULE > #define preemptible() (preempt_count() == 0 && !irqs_disabled()) > +#endif > > #ifdef CONFIG_PREEMPTION > #define preempt_enable() \ > > > $ git grep -w preemptible drivers > (slightly trimmed by hand to remove, eg, comments) > drivers/firmware/arm_sdei.c: WARN_ON_ONCE(preemptible()); > drivers/firmware/arm_sdei.c: WARN_ON_ONCE(preemptible()); > drivers/firmware/arm_sdei.c: WARN_ON_ONCE(preemptible()); > drivers/firmware/arm_sdei.c: WARN_ON_ONCE(preemptible()); > drivers/firmware/arm_sdei.c: WARN_ON(preemptible()); > drivers/firmware/efi/efi-pstore.c: preemptible(), record->size, record->psi->buf); > drivers/irqchip/irq-gic-v4.c: WARN_ON(preemptible()); > drivers/irqchip/irq-gic-v4.c: WARN_ON(preemptible()); > drivers/scsi/hisi_sas/hisi_sas_main.c: if (!preemptible()) > drivers/xen/time.c: BUG_ON(preemptible()); > > That only looks like two drivers that need more than WARNectomies. I could easily imagine someone thinking that these did something in CONFIG_PREEMPT_NONE=y kernels. In fact, I could easily imagine myself making that mistake. :-/ > Although maybe rcu_read_load_sched_held() or rcu_read_lock_any_held() > might get called from a module ... But yes, from the rcutorture module for certain and also from any other RCU-using module that includes the usual RCU debug checks. Thanx, Paul _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx