Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2143052pxu; Fri, 9 Oct 2020 09:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBZySDV1PGwqJBNsUTztrH+KUgky7Oegjyaj/BeX582mgESk0/86rfuPaB/PiRt5CrMIVw X-Received: by 2002:a17:906:6d0c:: with SMTP id m12mr14924473ejr.498.1602259200579; Fri, 09 Oct 2020 09:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602259200; cv=none; d=google.com; s=arc-20160816; b=HIseKK6p/Ng+w26C4UYi27OYqd+ufouZQMUCTbrklQnMtWs91OCBN7taBoJqm6rVTJ 81NXUso3t6cB5Z9pBsDpzNtjljlBQIz9B0ZasanHs0eGOpx4vz1CNjNKA8lAV9UftWTa wG0KPoKSaECr0SBb1WiWaGJCeZECUeBYpetL4Ts4Sxai0Ne6flXK0biLcqgjcxOhETGo +KufFpgBhDKMI6aTmLC2/kVvFJHjalQ+fxCObCiM6C7NvswkeBgmDWAeiq74c4prWccC Suzpl24V7jd/N7fdqP4oSPi1ZG2J+i6XbJ2tkCfQslvKax4uKCEF4d/dGRxCjEuGVKIL EgWA== 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=b/Bmskt9cxs4GEglK/3XlMMkdCnLS//YNFUZXsdZPrc=; b=VNYQ242/+0E3ulVghh5OGMTxSvzqbVdtJ53dABZYD7gAxcYixpZrQQ3JbKIMBHZp79 5OoeWmWcLUtloX/vGhTDKNHhJyN53Sb0WHkp+6y/TaipDB7uGyu9i0pqNTl8Kl+1hp5w aYI37yYkKmQLPnYIA+xbibevuYzWHN//FF9yvAxB6DBLTmTyCSvrtXHybrtZrvMHA6gB YTw79UNR6BTfcN27HS33tPYyTdx+B5s+iyeQSHxoXGJIFW/8UY4HkGztj6WXUVNtimHD q9GS7sHl2QCuZhgp1C1w6M6QFsnlnSaXziA2Jbg7x8+Lm//N7nels3Z6RKeo3aP92soO Vkqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=huvcr2ua; 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 p9si6063303eja.248.2020.10.09.08.59.36; Fri, 09 Oct 2020 09:00:00 -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=huvcr2ua; 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 S2389596AbgJIP6H (ORCPT + 99 others); Fri, 9 Oct 2020 11:58:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:51540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389380AbgJIP6H (ORCPT ); Fri, 9 Oct 2020 11:58:07 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.7]) (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 B12B222261; Fri, 9 Oct 2020 15:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602259087; bh=GIccIXTeOUkQO5mcfwWty2R6qImlNZ3E/Biu8uzF2Jw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=huvcr2uaG6zkbu0CTBPjcrAaGJTGsbbmzjJIjAensB3zmkYPy5stFz8FuZ0L0J7d3 wsuPNcnmTLxZ4CLeVgI6iebUIn6mFzMhqgkOJQg1a225707CTEzw4mNKq2DdHEj+TT 6wQN+YBrrir4B5p8Cel3orA8xmsQmzeX0DGgKN9U= Date: Fri, 9 Oct 2020 08:58:05 -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: <20201009085805.65f9877a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <8036d473-68bd-7ee7-e2e9-677ff4060bd3@gmail.com> References: <20201008162749.860521-1-john@metanate.com> <8036d473-68bd-7ee7-e2e9-677ff4060bd3@gmail.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 Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > I'm thinking about a __napi_schedule version that disables hard irq's > conditionally, based on variable force_irqthreads, exported by the irq > subsystem. This would allow to behave correctly with threadirqs set, > whilst not loosing the _irqoff benefit with threadirqs unset. > Let me come up with a proposal. I think you'd need to make napi_schedule_irqoff() behave like that, right? Are there any uses of napi_schedule_irqoff() that are disabling irqs and not just running from an irq handler?