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=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 A86A4C433DF for ; Sat, 10 Oct 2020 13:10:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AD3D221E9 for ; Sat, 10 Oct 2020 13:10:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BozUPSOD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="byvw0Fy4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AD3D221E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7q1zpEYKo58GeqP3Tkwe9DWbMBdM/4DEaVwiXGSwnhg=; b=BozUPSOD7wDzJiSiXav1nwSMn vtltiA+2x4uCEp3HekUyWCEnKr5FiCv7Yyn0vMkpKWNP4c08qDQ73tSZeHtoG2MjZ4ux9BZy2UXPm Z1wo1s48O2CSszkOqbZ/NFubdDfQnLPK0JzAOCkDSPzKOuDw+Sb0d+A2m3PK4BKg4O/7ohIgUvdpn 4GNmCW2ezfBkQco4dMVgSljq+jr9bGJ86onGIWF904kMdjp/7f45Z0MwMrs5R3wb9y5XuxMiJmjgC lTp/I3Ar/j/Edma35Jt4O5mdqoUcAGNnBlLziydOHjy6CnL3a43uD4dK7gztNBXMW3HioCjM1cwkq 4ZqecMUdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kREbp-00062V-Lh; Sat, 10 Oct 2020 13:08:25 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kREbm-00062C-Nm for linux-arm-kernel@lists.infradead.org; Sat, 10 Oct 2020 13:08:23 +0000 Received: by mail-ej1-x643.google.com with SMTP id t25so16934635ejd.13 for ; Sat, 10 Oct 2020 06:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IRzgnkzL+y6KxGnUDl6KgaiE0a2YhOVgP91PfZHg4Jo=; b=byvw0Fy4HVNaP4n7smhkuDqjTWMOiaFJVMkeRiZ3ec2F2chtyzQnuMP0wAlP3i+Pn2 phJpF74wVI6sccENkGwj9rueqnRXQ/jl4aTHLB+8wqpm/+L5yVgbAOa3pQSsp+cK1pG1 ftZm36sv696d5/c/iL7qbsxcglHZpjm4AilrMRrZyo2QEDOjAtAJQ0tUnQKevwGXOPr+ 7n/19bs7ClEXbaWInlMsQfTLf5Dbur8Ls0TqTXNQ5KYqijuvicyoqKCr2d4FsV0nJDUt W7cJpFY6AQ0TfOMZ7CEX7witi82v0jv7tJE82bwVSWTbTQbyiLVnMhGgqTc2w0ltbBF6 jZrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IRzgnkzL+y6KxGnUDl6KgaiE0a2YhOVgP91PfZHg4Jo=; b=jv14oBPoiNB5ZpnNWDMiKAH9ArS2JqH/BFZ9AOJNdzIwfcOuLuaDrm3LGgS92iTw69 d1+2lXzd0OXVaKuKQW1i6HBqsJ64v6zUUcm/5YyTaLFNFpMELxId9WfIwkgRzrVCPw+z kyytREzIdgV6z/pds2y0M5q3Pu2Kw9DYIB4q29bzVbScrJfnhZqPPZzbZ3+BycvEz8ck qFv2FU8hzMDE6bppE537oK59QnkTBA7GeES3qn7sqJqMQw9QybLIRZGW37xqW3+NJ+SE u1eSz4Zqz6Rmi5Q5dbkbd38nrsXPClyYWNv/xTrcqnJ2HEDbzHmjMScdCzFXrMronCo5 cOeA== X-Gm-Message-State: AOAM530xh6VSW8swW0JQe5wxdIxBmkI1aMOKUfFZOzI8Tu3qrjClNep1 JBAIawQZ/uL9iZWr7LcujRU= X-Google-Smtp-Source: ABdhPJxzUGEzr8/XiZNnjXysIPZx6Ugs44w2gLiyH/uHXdxmPOdrI+o1ulKAbcwE/CaIuoc86J7qfw== X-Received: by 2002:a17:906:39ce:: with SMTP id i14mr20143131eje.170.1602335301421; Sat, 10 Oct 2020 06:08:21 -0700 (PDT) Received: from ?IPv6:2003:ea:8f00:6a00:14e2:2617:c2db:d1c8? (p200300ea8f006a0014e22617c2dbd1c8.dip0.t-ipconnect.de. [2003:ea:8f00:6a00:14e2:2617:c2db:d1c8]) by smtp.googlemail.com with ESMTPSA id gv10sm7888810ejb.46.2020.10.10.06.08.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 10 Oct 2020 06:08:20 -0700 (PDT) Subject: Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled From: Heiner Kallweit To: Jakub Kicinski 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> Message-ID: <070b2b87-f38c-088d-4aaf-12045dbd92f7@gmail.com> Date: Sat, 10 Oct 2020 15:08:15 +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: <725ba7ca-0818-074b-c380-15abaa5d037b@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201010_090822_792994_BD7232C2 X-CRM114-Status: GOOD ( 15.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Eric Dumazet , Jose Abreu , John Keeping , Maxime Coquelin , Giuseppe Cavallaro , "David S. Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09.10.2020 18:06, Heiner Kallweit wrote: > 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. > With some help from coccinelle I identified the following functions that call napi_schedule_irqoff() or __napi_schedule_irqoff() and do not run from an irq handler (at least not at the first glance). dpaa2_caam_fqdan_cb qede_simd_fp_handler mlx4_en_rx_irq mlx4_en_tx_irq qeth_qdio_poll netvsc_channel_cb napi_watchdog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel