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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 B9DB9C433E7 for ; Sun, 11 Oct 2020 16:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7399F20776 for ; Sun, 11 Oct 2020 16:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602432427; bh=0pTIrX9OOi88NEgA5/B1qpPHXrYAtUk/EQDmA++8rfg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=pj1UlTtcANIrZekDGLRcDdyL3Q0CMinEuboAvvtPQPMyaCFrrhhSUMKtAeVHtwBXM z1ITLO2HRKRIq4iHS/YaSBYMUPKz/oyPRVoz5l0c7XXhklydmSIZBxzZDCwXofYeWf P960scBzvWf8Yi1qYB18t0nVElhSssxPUdVec4gc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388077AbgJKQGp (ORCPT ); Sun, 11 Oct 2020 12:06:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387799AbgJKQGX (ORCPT ); Sun, 11 Oct 2020 12:06:23 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (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 3813120678; Sun, 11 Oct 2020 16:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602432382; bh=0pTIrX9OOi88NEgA5/B1qpPHXrYAtUk/EQDmA++8rfg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=curs9miwdNGXwW227Ox77jhLxuxvZqJYBGf0THsTih8EyPRna/vlPjhUXv+ZptM4U pC4azNuqNh+QQJkV0hUxcibYF1f9ivO0lONG3GxRernnQzhbAa37XWmz8XDCn9Q7UW I4Yxe82xhjMJbf2oJKhUy+FL0j0SDX9My/eSQUvI= Date: Sun, 11 Oct 2020 09:06:20 -0700 From: Jakub Kicinski To: Heiner Kallweit Cc: John Keeping , netdev@vger.kernel.org, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Eric Dumazet Subject: Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled Message-ID: <20201011090620.48afafd7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20201008162749.860521-1-john@metanate.com> <8036d473-68bd-7ee7-e2e9-677ff4060bd3@gmail.com> <20201009085805.65f9877a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <725ba7ca-0818-074b-c380-15abaa5d037b@gmail.com> <070b2b87-f38c-088d-4aaf-12045dbd92f7@gmail.com> <20201010082248.22cc7656@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Oct 2020 11:24:41 +0200 Heiner Kallweit wrote: > >> qeth_qdio_poll > >> netvsc_channel_cb > >> napi_watchdog > > > > This one runs from a hrtimer, which I believe will be a hard irq > > context on anything but RT. I could be wrong. > > > > A similar discussion can be found e.g. here: > https://lore.kernel.org/netdev/20191126222013.1904785-1-bigeasy@linutronix.de/ > However I don't see any actual outcome. Interesting, hopefully Eric will chime in. I think the hrtimer issue was solved. But I'm not actually seeing a lockdep_assert_irqs_disabled() in __raise_softirq_irqoff() in net, so IDK what that's for? In any case if NAPI thinks it has irqs off while they're not, and interacts with other parts of the kernel we may be in for a game of whack-a-mole. Perhaps a way around touching force_irqthreads directly in net/ would be some form of a helper like "theaded_local_irq_save" or such that'd disable IRQs only if force_irqthreads == 1? Is that cheating? :)