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.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,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 CEC54C433E7 for ; Fri, 16 Oct 2020 14:42:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 658242084C for ; Fri, 16 Oct 2020 14:42:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tXBF5dy+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409088AbgJPOl7 (ORCPT ); Fri, 16 Oct 2020 10:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408915AbgJPOl7 (ORCPT ); Fri, 16 Oct 2020 10:41:59 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB3EC061755 for ; Fri, 16 Oct 2020 07:41:58 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id lw21so3537402ejb.6 for ; Fri, 16 Oct 2020 07:41:58 -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=8xjnefrWmLPixJGXON6GHeT9VeSRG2r1UKfC37c3E9A=; b=tXBF5dy+KVEyJ26skMKNMeJ4ONaclyRSmqLGZT2VBnMtJugb4/gc2L0KMqNfieOZDJ TQvZ1r7gmWwf8Qaw6gs5gjHx39TDYoesV3kQ4ubAIDUgt+g7/ZxHJoeD8nagWjKB/1md 2deq8XFLSbHL1Yc/CwdvFZ3m+pjNpr9VcNyMsPQrreFdp66NTOdGrqE+1ZE1uETvTKzt zfA7nAT5HN8C5WVcGkNoolsl8natVTXcgwaxe4wbGb8C5CeNLYymbavkEL/zRId13EOO tVmM9/PZIRXEd04CyZBpQLU7nB9DagSQaWJG2hlNlYr7qXyklm0SRG8lzSzcOvti0BjD qvKg== 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=8xjnefrWmLPixJGXON6GHeT9VeSRG2r1UKfC37c3E9A=; b=FCCFxZ/tv9qyu7B9wQlnU5iv5yf9YKjpy3/yRP/UhbkokiwYGqouK5rUnT0eUAOLCp vt+W/0No88qG2SHdbmJpTT20YRtJVaDdcli7hIKYp7chCjbyysg2OerF478PwJhditte GUy8DcrH4mzcXRGxPJAtrefiXmtdb29oIW4YNf3eS3LbRQyXw5WK8CHFji7UIunA/+/F GTrsPiMShfnKXQx4oLqpifytIuW/hRacMBnUV8OG92ZJYvdoUffgaz8q6OyzXzxep4Gw b4rtt2tA6e7AAdhwXt5INShdNeCz4ytMHr/eZCmbUfMmjWIOuKxOTxI/XOUkPH7+bbwc bfhw== X-Gm-Message-State: AOAM530zBixfHo27cCpvsKeZH9kOlm4NUCZO9d/c7EOAjCXCAyKgLRM3 Ng8PyAl0W8sA70DOi517wLU= X-Google-Smtp-Source: ABdhPJymNXHcAkH7IhpoPjvmcvqYCMDLqHPCKZ/9KwNU/LIL/kvEMRa6sMuoBoOLjjXIjB5Tms0YTw== X-Received: by 2002:a17:906:54c7:: with SMTP id c7mr3998698ejp.21.1602859316869; Fri, 16 Oct 2020 07:41:56 -0700 (PDT) Received: from ?IPv6:2003:ea:8f23:2800:51b3:5acb:4e57:82fe? (p200300ea8f23280051b35acb4e5782fe.dip0.t-ipconnect.de. [2003:ea:8f23:2800:51b3:5acb:4e57:82fe]) by smtp.googlemail.com with ESMTPSA id e17sm1745749ejh.64.2020.10.16.07.41.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Oct 2020 07:41:56 -0700 (PDT) Subject: Re: [patchlet] r8169: fix napi_schedule_irqoff() called with irqs enabled warning To: Vladimir Oltean Cc: Mike Galbraith , netdev , Realtek linux nic maintainers References: <9c34e18280bde5c14f40b1ef89a5e6ea326dd5da.camel@gmx.de> <7e7e1b0e-aaf4-385c-b82c-79cac34c9175@gmail.com> <20201016142611.zpp63qppmazxl4k7@skbuf> From: Heiner Kallweit Message-ID: Date: Fri, 16 Oct 2020 16:41:50 +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: <20201016142611.zpp63qppmazxl4k7@skbuf> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 16.10.2020 16:26, Vladimir Oltean wrote: > On Fri, Oct 16, 2020 at 01:34:55PM +0200, Heiner Kallweit wrote: >> I'm aware of the topic, but missing the benefits of the irqoff version >> unconditionally doesn't seem to be the best option. > > What are the benefits of the irqoff version? As far as I see it, the > only use case for that function is when the caller has _explicitly_ > disabled interrupts. > If the irqoff version wouldn't have a benefit, then I think we wouldn't have it .. > The plain napi_schedule call will check if irqs are disabled. If they > are, it won't do anything further in that area. There is no performance > impact except for a check. > There is no such check, and in general currently attempts are made to remove usage of e.g. in_interrupt(). napi_schedule() has additional calls to local_irq_save() and local_irq_restore(). >> Needed is a function that dynamically picks the right version. > > So you want to replace a check with another check, am I right? How will > that improve anything performance-wise? >