Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2151286pxu; Fri, 9 Oct 2020 09:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymTJDLf61+uFbgiN9wlwlbY1+k7W1rjXWGdgug/lXyMZz7itAGmB2ImjgwvArSk9zOmt/8 X-Received: by 2002:a17:906:881:: with SMTP id n1mr14549856eje.502.1602259715508; Fri, 09 Oct 2020 09:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602259715; cv=none; d=google.com; s=arc-20160816; b=KMJqGDmIziOAZZ8cfWYeMXslxN1ZSgZReJbRhxzAbsSodS3idyLQs5YOTBPWvYs51O Hy4sBWMVR+4QFVhxTLIjx/iiOMe8MVIIcGwwx8r2GFLjzaEwY8+Iy82Kr35RiKTKgr/O B9GJoBS75y0m+vzL2khT5elrchjve9niUiZY2lO3JmP67jxt0NL9QvTuU9hZmUKRch95 WAsnuecfAb4QhsZDvs2q8r9NYHWP3Np6pu3Sk7ThmC7f9Ro9mASjK3ZWbqVN8Bv4U9RS CFCEQGsDQhr3jdvsjltceZ9s+qFn3os7fYUcpDw2HXuZwM7mPE2CPAAn/QueOfvo/iJY A8Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=mxO+I5LNxrcOwcYvX0IJyyJi/v9s48ckxPqo00HL+Xw=; b=ZDvABCtKeRvKguyT2Lr3GXhib7ZON89JJakNqX+li+1xoJHFfKnSpKBSNh/X7V/KVj nOfiioj3+Kd0n17uFN/o4wYJWf5B4hr/oLBT1QUNZcadLYd5+snZKeBZNNMMtfX/E5Uu laG4FqYph6mUhhYPXx5S1OKGYfTkyxle8afxH0CCO3bT+1cm2N+BxWSfmsvLVQkwuQ/y pT2ltBAA86WghUeegkfcpmYan9L640hKnil0ISsx0FxaXGkuMscER7ic6tik1Kylb9Jq EzuqlEaROEuo0VnBx9IdV20RMtfAj+nd7s7m0dPpgVKSeMk1BduZq9mKu5oUbvGu2mI6 Leng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XV+ZUq/h"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs5si6204170edb.416.2020.10.09.09.08.12; Fri, 09 Oct 2020 09:08:35 -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=@gmail.com header.s=20161025 header.b="XV+ZUq/h"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389618AbgJIQGd (ORCPT + 99 others); Fri, 9 Oct 2020 12:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389144AbgJIQGc (ORCPT ); Fri, 9 Oct 2020 12:06:32 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80208C0613D2; Fri, 9 Oct 2020 09:06:32 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id dt13so13821469ejb.12; Fri, 09 Oct 2020 09:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mxO+I5LNxrcOwcYvX0IJyyJi/v9s48ckxPqo00HL+Xw=; b=XV+ZUq/hdjuq/ARetFqqjacQh/2BcONSA8rW35fw/sBgoXDcprcPgR6H8drf3Ey1Pb L+GksaUV5G7fhGeMBHTWbmOgZA5sI+gfr08BN2LCuIOvK0Vu1Gs/Z2AxWW+1OA9Pg0+h Q1ETKnshvjGqaUoBTGakzrxvMgWTxwYut+4KYvQlolNriey5VTfQAUwAX2Y6LAo309Js BN3WNNY5bYSedSO9dTY9IpWZJK3dAwBB/+dABgWpa0QDEG6owkzILh0unCZCRgjYn/lA RG2VnG/E+jnlD+FDd2JE30Ijeh3qIRRXHVnQuP2K4pfMfTmY89uzPfFo2k9/JRbMNtKU iZww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mxO+I5LNxrcOwcYvX0IJyyJi/v9s48ckxPqo00HL+Xw=; b=qXhnZYS6+2Ixz27xAdNUlfZo7Y8l4GJ2AgpKSgwn8KU+anqndoRY2zwFA9HmFiXkhn 8xkHTji28nYmqgsDnIQQulf65AR7iLIiw8sVS9WHcn2TvvBmOZLwGh+/bfmbsIk/LQMQ CZU9e7eCX8ruMUYYd2dbaCIiAEB9GTnFFPt9KjWL1D9Dt3oHLM7AQRViYgN6kg5KN6lf yxM3lyADGlnCwM8ywE+i3b9L6v4BGC0C9ehpeRoMWRUr2uRRyjo6OsY7fe2Fhk45PEFQ OjaJWIMmocRPuQq7skj37Pt6gQja4AJY1sZfJ0IuK8UBIbuShcEXJThu2mB7sNvvObV/ SQtw== X-Gm-Message-State: AOAM530W8ciyHTLg3xyAJmdmXrsclzRCXqWqBVw6rbyaVGBaINkfYZSQ LQXshyLpO8DibhfesyJqGpw= X-Received: by 2002:a17:906:f0d8:: with SMTP id dk24mr14840855ejb.492.1602259591162; Fri, 09 Oct 2020 09:06:31 -0700 (PDT) Received: from ?IPv6:2003:ea:8f00:6a00:e538:757:aee0:c25f? (p200300ea8f006a00e5380757aee0c25f.dip0.t-ipconnect.de. [2003:ea:8f00:6a00:e538:757:aee0:c25f]) by smtp.googlemail.com with ESMTPSA id v14sm867268edy.68.2020.10.09.09.06.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Oct 2020 09:06:30 -0700 (PDT) Subject: Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled To: Jakub Kicinski 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 References: <20201008162749.860521-1-john@metanate.com> <8036d473-68bd-7ee7-e2e9-677ff4060bd3@gmail.com> <20201009085805.65f9877a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Heiner Kallweit Message-ID: <725ba7ca-0818-074b-c380-15abaa5d037b@gmail.com> Date: Fri, 9 Oct 2020 18:06:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201009085805.65f9877a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.10.2020 17:58, Jakub Kicinski wrote: > 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? > Right, the best approach depends on the answer to the latter question. I didn't check this yet, therefore I described the least intrusive approach.