Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3478912pxu; Sun, 11 Oct 2020 11:09:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww8kMcumY4twhMQaQcSaox1IWWJOfvsmb98cbYSI3aI6F5WSnf90344FzqJVzvhAvBDvml X-Received: by 2002:aa7:da05:: with SMTP id r5mr10235640eds.184.1602439742120; Sun, 11 Oct 2020 11:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602439742; cv=none; d=google.com; s=arc-20160816; b=DTSXw+33Ae1xo6NYJb4zTy/he/tLM6xFCdowdvS+MhpAxJJj63qJPb7PM7vgRBtjlN TdEKKK2Jr/xF85tF0vNFjb/lLDQO5DsKQn3mYG8ISp4X+BtoVM1oVDMmiPoFB8zwoPpD xfHo3Qtw3Ku5tGjTkuxe8+YCHYSMpx2leMWpeENeLGZz6EmeCRJnJYFkNcVbR2YRt8UY d871O4A/8wADK3zc/GcV5nebgSwtoj75Qu2yZEtpKpuPre3BBVcHOQtdT/tELTWTOLsT 1hSfacPbsG2GrZ+SyFQ1Z+ddWDzYSKnF4JVu+tRFIo+eWIYqYEqyx35hxPH89UtXkXiU t4xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=H6QXtCWbip/jNfRoEwKq85ZPjmb7HFADyB02vpLw7Wo=; b=dg5JNbRM3Nm9L8WCiNo2EyyrdVu8vhGnkpGPFg+H+LDCLoE1lfDedmXajoY8K1mrUn OrKLF7VMU7NbZetsunv0AkTLMIkxsria0xXmo4x8UR2dAGIb54pfPJBLLzHRdhpcyvOB ZiE8QldyqDHcfNstjPoxnlWhLVLkYhheKfp2AWrfHc7PazGFVs4bO0EQmTtan0RCizf8 nn3flsih6fBdlVsNsELO8T5UID1HdoP1v30sGMVqIO6ZEi6mVSsFXDhazg/U9XHrxnCf BMCIbKD8GrO42XhppjxXAt2lKOH+cY55tWDHP2ue04C+3u4+7XxKrnXSF0BaVaXZnhcb bn8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=curs9miw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de5si10563790edb.573.2020.10.11.11.08.38; Sun, 11 Oct 2020 11:09:02 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=curs9miw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388003AbgJKQGp (ORCPT + 99 others); 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? :)