Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp128861pxf; Wed, 7 Apr 2021 22:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc5TjLe1EuK966u4Cv3uC5ITe53GwHMey7+102dB4NXaKjgrhGLlIuyJtiezvggTyymnFa X-Received: by 2002:a17:90a:28a1:: with SMTP id f30mr6722201pjd.198.1617859457238; Wed, 07 Apr 2021 22:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617859457; cv=none; d=google.com; s=arc-20160816; b=BvczXZfXnV/9qeGwRLdjFpgXLudqbvEQ+CFwhDKoKUhc+rjn3zqvo487ZGzGeXYadp gOqiykS6uCnPoGzt8mOciywuBq6+iNb75tfHo+C+cqQjiME2E1QnbfddrQUA8oaRU+D7 6dWS8tfvgJ373UaViAHxHWyJVLUwK3Hfl89Ygp71QFB//MfyBr1IZ3RSGZiELMGtooTS N1wY0fNCb9b1RUydWHz43j/7ryWjCnT5e5wt/Xm7vcdXOhy3D1Bvg268Of0eStotN/wJ CZx7U6DViTdXFvBVeaFEZ4fQy99WGznO5ovgqG2xBSLDc7dj9TtiiobAVwOSG+a5bHKA mS3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=56fGKmUOIKXrgb9zxxmeUFu9LAt8LZk2+nRDVNo6wk4=; b=wUawg9Q7Ix3BO1OtUYDmWkLnCMHx6ESJl9p+zntdu6FbHm1+pBMLJSUop6imyjqhy5 kmTRfmon+tsexWSLZqHriW2u70Zjf6rSI/y5O+sjETJKfIuZloQEV3CQg00Ak+ZUzP74 cU28PQLOEZTseRk602LvDF2l3S6faDx6heO7m5cnoggHX+y8q/oFqcSymv3hE9GwwZSn BoCjcICLoimkpZkfxtPRfAKuytWM/JbkykUMboFY2b+O0tOXpG7eeKcMU7Jk/J5vCd+Z XfSTC5H7KvYStu68n6ImUuFefAOvql1rzyBvPoM+MZgnPxLH5axh5NLWf5jhAh0jGVA3 UKIA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si8452751pjv.89.2021.04.07.22.24.04; Wed, 07 Apr 2021 22:24:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229739AbhDHFVh (ORCPT + 99 others); Thu, 8 Apr 2021 01:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbhDHFVh (ORCPT ); Thu, 8 Apr 2021 01:21:37 -0400 Received: from plekste.mt.lv (bute.mt.lv [IPv6:2a02:610:7501:2000::195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48E52C061760; Wed, 7 Apr 2021 22:21:26 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=bute.mt.lv) by plekste.mt.lv with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lUN6W-0003fP-72; Thu, 08 Apr 2021 08:21:20 +0300 MIME-Version: 1.0 Date: Thu, 08 Apr 2021 08:21:20 +0300 From: Gatis Peisenieks To: Eric Dumazet Cc: chris.snook@gmail.com, davem@davemloft.net, kuba@kernel.org, hkallweit1@gmail.com, jesse.brandeburg@intel.com, dchickles@marvell.com, tully@mikrotik.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v4] atl1c: move tx cleanup processing out of interrupt In-Reply-To: <7c5dad3e-950d-8ec9-8b9d-bbce41fafaa4@gmail.com> References: <7c5dad3e-950d-8ec9-8b9d-bbce41fafaa4@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <5bd5e1b9c1fdf8c9a43a0d018a005eab@mikrotik.com> X-Sender: gatis@mikrotik.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-04-07 19:55, Eric Dumazet wrote: > On 4/6/21 4:49 PM, Gatis Peisenieks wrote: >> Tx queue cleanup happens in interrupt handler on same core as rx queue >> processing. Both can take considerable amount of processing in high >> packet-per-second scenarios. >> >> Sending big amounts of packets can stall the rx processing which is >> unfair >> and also can lead to out-of-memory condition since __dev_kfree_skb_irq >> queues the skbs for later kfree in softirq which is not allowed to >> happen >> with heavy load in interrupt handler. >> > > [ ... ] > >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 0f72ff5d34ba..489ac60b530c 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -6789,6 +6789,7 @@ int dev_set_threaded(struct net_device *dev, >> bool threaded) >> >>      return err; >>  } >> +EXPORT_SYMBOL(dev_set_threaded); >> >>  void netif_napi_add(struct net_device *dev, struct napi_struct *napi, >>              int (*poll)(struct napi_struct *, int), int weight) > > This has already been done in net-next > > Please base your patch on top of net-next, this can not be backported > to old > versions anyway, without some amount of pain. Thank you Eric, for heads up, the v5 patch sent for net-next in response to David Miller comment already does that.