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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 A35C6C4361A for ; Sat, 5 Dec 2020 19:25:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D0A422C9F for ; Sat, 5 Dec 2020 19:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgLETZF (ORCPT ); Sat, 5 Dec 2020 14:25:05 -0500 Received: from foss.arm.com ([217.140.110.172]:44870 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbgLETZE (ORCPT ); Sat, 5 Dec 2020 14:25:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B46830E; Sat, 5 Dec 2020 11:24:19 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BED653F575; Sat, 5 Dec 2020 11:24:17 -0800 (PST) References: <20201124141449.572446-1-maz@kernel.org> <20201124141449.572446-3-maz@kernel.org> <20201203130320.GQ3021@hirez.programming.kicks-ass.net> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Peter Zijlstra Cc: Marc Zyngier , LAK , linux-kernel , Will Deacon , Catalin Marinas , Thomas Gleixner , Mark Rutland , Russell King , Android Kernel Team Subject: Re: [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw' In-reply-to: Date: Sat, 05 Dec 2020 19:24:15 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/20 15:52, Valentin Schneider wrote: > On 03/12/20 13:03, Peter Zijlstra wrote: [...] >> The scheduler IPI really doesn't need RCU either ;-) [...] > But as with any other interrupt, we could then go through: > > preempt_schedule_irq() ~> pick_next_task_fair() -> newidle_balance() > > which does enter a read-side section, so RCU would need to be > watching. Looking at kernel/entry/common.c:irqentry_exit_cond_resched(), it > seems we do check for this via rcu_irq_exit_check_preempt(). > > I however cannot grok why irqentry_exit() *doesn't* call into > preempt_schedule_irq() if RCU wasn't watching on IRQ entry RCU wasn't watching on IRQ entry: -> we should be on the idle task -> no unvoluntary preemption for the idle task, scheduling always happens at the tail of the idle loop -> ignore what I've been saying, current patch is fine