Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp589718pxu; Thu, 3 Dec 2020 07:56:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp/1Hafd9TaKJTLbgTlv5LxBZQMtBQiQI4TvRit53OPEHN2ot1NGgrYa5DyUCls2cx0+rl X-Received: by 2002:aa7:c3c2:: with SMTP id l2mr3382061edr.15.1607011012241; Thu, 03 Dec 2020 07:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607011012; cv=none; d=google.com; s=arc-20160816; b=HABEybVMdWSV/97+zwR/vCzgpmnwn3HQzhBSuLhhS3ugb7Y/fED+vX/rie5Mpab+2q bfvZTMQQekOt4QwL89aA9s1lEneMCXcUUa5SFDq38k2crjNY0rTSgt8lSwuN15sHs4Xf B7Zb5N9GRRMqHMHFAUb9SlsZEq+hRRFtRxHYQUaOf5AXu9hxdxL6RavRGBUr5J8yqDY5 vsCYhEGwib7+ZsazjbyXe0CT7U1VIxVfmfFGB2yMcernolx6hnjdf7Wea9BWrpzBQTiF Cotp9jvh0TXgsg+sheAZocS+ffVrkXdJbelXOmC75vePZQcxJZOowmqtvMofL6N5jhJM u9Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:user-agent:references; bh=0B/4CNL2Kw3oE811li8h8gSH8J66l/VE3X7pTn3Zyr8=; b=QoGtw2p3QFknEappoxJtuDqZeytk4l/BcgwtxHRlPzWnjZffcDhlSXQKePcLWQyDGb pS8T4hZE4g7HGZ5uOMuLLKNS687Jrf9VMt/O/PmjH1w6EyAu4PXU7HCee5g0QYoFXlUS UC3ac+/+1n18ISZfjfcGKz09ZeGvwk+0kvQKhQYVauDUYfinMN387b/p9Tsd9izyK1Fc 4rNeP1hY52Phsr/TbzbTjbo6F9j0wPf6IIh0R8vOg+jvg3Vf/JTUeKtx8yRfz85pa0qu CdDd0I0v7XjHohrtpZtKyhhwo4aiaGnMrpor2rTS3kAEKomLkZdTJ8gjXuWycTxDhyB6 0nXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si252733edr.560.2020.12.03.07.56.28; Thu, 03 Dec 2020 07:56:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731021AbgLCPxl (ORCPT + 99 others); Thu, 3 Dec 2020 10:53:41 -0500 Received: from foss.arm.com ([217.140.110.172]:43842 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgLCPxl (ORCPT ); Thu, 3 Dec 2020 10:53:41 -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 AFA4B11D4; Thu, 3 Dec 2020 07:52:55 -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 5BF663F575; Thu, 3 Dec 2020 07:52:49 -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: <20201203130320.GQ3021@hirez.programming.kicks-ass.net> Date: Thu, 03 Dec 2020 15:52:44 +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 13:03, Peter Zijlstra wrote: > On Thu, Nov 26, 2020 at 06:18:33PM +0000, Valentin Schneider wrote: >> If I got the RCU bits right from what Thomas mentioned in >> >> https://lore.kernel.org/r/87ft5q18qs.fsf@nanos.tec.linutronix.de >> https://lore.kernel.org/r/87lfewnmdz.fsf@nanos.tec.linutronix.de >> >> then we're still missing something to notify RCU in the case the IRQ hits >> the idle task. All I see on our entry path is >> >> trace_hardirqs_off(); >> ... >> irq_handler() >> handle_domain_irq(); >> ... >> trace_hardirqs_on(); >> >> so we do currently rely on handle_domain_irq()'s irq_enter() + irq_exit() >> for that. rcu_irq_enter() says CONFIG_RCU_EQS_DEBUG=y can detect missing >> bits, but I don't get any warnings with your series on my Juno. > > The scheduler IPI really doesn't need RCU either ;-) Because it doesn't enter any new read-side section, right? 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, so I'm starting to question everything (again).