Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp232388pxf; Thu, 25 Mar 2021 02:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTepwY5QlJrdb2Pc/UHGNWac3JFlWVyhD2yd4HPi673B7JjXKEGy/D39BYyjZZtR9Ht15C X-Received: by 2002:a05:6402:1517:: with SMTP id f23mr8308926edw.272.1616665638081; Thu, 25 Mar 2021 02:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616665638; cv=none; d=google.com; s=arc-20160816; b=yCkVq2xVH/nexXkjt3SdAVf2oRxr3Zwjhz01QgSlmCwNFiIgJ5sIgbRDnj+qa3nzpo /OBpCI/+hLZ56VQlLJRUZMfZBAVzKfKbVLgZsTaIcgu90E5EsH7JtayfIIiHdrjvYKTQ NZIr2WjsChrBksapSNcpE9Mbnx/wmpLGzIRBu1QtzMSXsFNs1tsLLm7ausjSeb5NxeUW xDj4F5Iq61bgCT5ILuxL8L5F5aA9AEz36nHFhyyb0oQNtCmf5p7NflB4bpq/SADq/ytv jXVNO8bBDa6rNcB0Ba1mup/jcPak60YGzczauuNDwc59Nx9JRuu3vQNQ0OHTyf3FbsOJ 2RWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dmarc-filter:sender :dkim-signature; bh=xLZMPOc+Bf0JSFPQICytoPaldsUvFtyL1tpTNNRZGmo=; b=oNTaVYLeitNktSj/UhaqlT6sZqcgSED7HLd/pTlU/2FhAu+/ghBUMzlrh2C2FjbSyW tmc4Jf3JoempBAnG17gtj82zqeA37zNeE+bfkYSdPv2u7KVMOWqmaOKC551556eqmW3T 2E/ffHFHJrr5xzs1Ck2AqHSsmn3QgGUaxhKiRtMdbmgZbnGD/Yc7RI314ZLtGCbY4/h9 KRz1u+n6xgGgwz0s1YCoZO3zTUIGcfbgSHCh7rJXAA2Z0X1AACEaIZgb15vErjjnjiZz U7MFJEoEvqAngaleKxBGsl8LsFNoNllOQFXIXxGtvyYBRTO3BS8pzhE1kfvrCM8g51N/ ZfIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=fgEDhRe1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 c8si3912151edq.326.2021.03.25.02.46.52; Thu, 25 Mar 2021 02:47:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@mg.codeaurora.org header.s=smtp header.b=fgEDhRe1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhCYJqN (ORCPT + 99 others); Thu, 25 Mar 2021 05:46:13 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:28152 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbhCYJqF (ORCPT ); Thu, 25 Mar 2021 05:46:05 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1616665565; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: Cc: To: From: Sender; bh=xLZMPOc+Bf0JSFPQICytoPaldsUvFtyL1tpTNNRZGmo=; b=fgEDhRe1Rsg9SJr4BWLHu0GCxHolNL4f4qNsTKjOwrffA2IXarxBHJl+AXPmB/CgdTiOx93U lejPjg08n9x9VD/QWdlndiocjpA9L6C2B2UTc+mx2yKxZn2fpA+90cqQEfuw+9a92kGiChhU MULi2KZtT8YwCGx3a8sdrbOHuOc= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 605c5bd12b0e10a0ba26d3f9 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 25 Mar 2021 09:45:53 GMT Sender: pillair=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C9E29C433ED; Thu, 25 Mar 2021 09:45:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, PDS_BAD_THREAD_QP_64,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from Pillair (unknown [103.149.159.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pillair) by smtp.codeaurora.org (Postfix) with ESMTPSA id 770E0C433CA; Thu, 25 Mar 2021 09:45:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 770E0C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=pillair@codeaurora.org From: "Rakesh Pillai" To: "'Felix Fietkau'" , "'Ben Greear'" , "'Brian Norris'" Cc: "'Johannes Berg'" , "'Rajkumar Manoharan'" , "'ath10k'" , "'linux-wireless'" , "'Linux Kernel'" , "'Kalle Valo'" , "'David S. Miller'" , "'Jakub Kicinski'" , , "'Doug Anderson'" , "'Evan Green'" References: <1595351666-28193-1-git-send-email-pillair@codeaurora.org> <1595351666-28193-3-git-send-email-pillair@codeaurora.org> <13573549c277b34d4c87c471ff1a7060@codeaurora.org> <04d7301d5ad7555a0377c7df530ad8522fc00f77.camel@sipsolutions.net> <1f2726ff-8ba9-5278-0ec6-b80be475ea98@nbd.name> <06a4f84b-a0d4-3f90-40bb-f02f365460ec@candelatech.com> <47d8be60-14ce-0223-bdf3-c34dc2451945@candelatech.com> <633feaed-7f34-15d3-1899-81eb1d6ae14f@nbd.name> In-Reply-To: <633feaed-7f34-15d3-1899-81eb1d6ae14f@nbd.name> Subject: RE: [RFC 2/7] ath10k: Add support to process rx packet in thread Date: Thu, 25 Mar 2021 15:15:44 +0530 Message-ID: <003701d7215b$a44ae030$ece0a090$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG1Bu1FBYi7G1oVhHY/01uT1gSslwH2O/GCAtCmWRoBYxlAVQH0T8LwAZ17l3YBXZ7u8AIxJEyGAbYhhCACZ7wzuKpNZQxQ Content-Language: en-us Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Felix Fietkau > Sent: Tuesday, March 23, 2021 1:16 PM > To: Ben Greear ; Brian Norris > > Cc: Johannes Berg ; Rajkumar Manoharan > ; Rakesh Pillai ; = ath10k > ; linux-wireless wireless@vger.kernel.org>; Linux Kernel = ; > Kalle Valo ; David S. Miller > ; Jakub Kicinski ; > netdev@vger.kernel.org; Doug Anderson ; Evan > Green > Subject: Re: [RFC 2/7] ath10k: Add support to process rx packet in = thread >=20 >=20 > On 2021-03-23 04:01, Ben Greear wrote: > > On 3/22/21 6:20 PM, Brian Norris wrote: > >> On Mon, Mar 22, 2021 at 4:58 PM Ben Greear > wrote: > >>> On 7/22/20 6:00 AM, Felix Fietkau wrote: > >>>> On 2020-07-22 14:55, Johannes Berg wrote: > >>>>> On Wed, 2020-07-22 at 14:27 +0200, Felix Fietkau wrote: > >>>>> > >>>>>> I'm considering testing a different approach (with mt76 = initially): > >>>>>> - Add a mac80211 rx function that puts processed skbs into a = list > >>>>>> instead of handing them to the network stack directly. > >>>>> > >>>>> Would this be *after* all the mac80211 processing, i.e. in place = of the > >>>>> rx-up-to-stack? > >>>> Yes, it would run all the rx handlers normally and then put the > >>>> resulting skbs into a list instead of calling netif_receive_skb = or > >>>> napi_gro_frags. > >>> > >>> Whatever came of this? I realized I'm running Felix's patch since = his mt76 > >>> driver needs it. Any chance it will go upstream? > >> > >> If you're asking about $subject (moving NAPI/RX to a thread), this > >> landed upstream recently: > >> = http://git.kernel.org/linus/adbb4fb028452b1b0488a1a7b66ab856cdf20715 > >> > >> It needs a bit of coaxing to work on a WiFi driver (including: WiFi > >> drivers tend to have a different netdev for NAPI than they expose = to > >> /sys/class/net/), but it's there. > >> > >> I'm not sure if people had something else in mind in the stuff = you're > >> quoting though. > > > > No, I got it confused with something Felix did: > > > > https://github.com/greearb/mt76/blob/master/patches/0001-net-add- > support-for-threaded-NAPI-polling.patch > > > > Maybe the NAPI/RX to a thread thing superceded Felix's patch? > Yes, it did and it's in linux-next already. > I sent the following change to make mt76 use it: > https://github.com/nbd168/wireless/commit/1d4ff31437e5aaa999bd7a Hi Felix / Ben, In case of ath10k (snoc based targets), we have a lot of processing in = the NAPI context. Even moving this to threaded NAPI is not helping much due to the load. Breaking the tasks into multiple context (with the patch series I = posted) is helping in improving the throughput. With the current rx_thread based approach, the rx processing is broken = into two parallel contexts 1) reaping the packets from the HW 2) processing these packets list and handing it over to mac80211 (and = later to the network stack) This is the primary reason for choosing the rx thread approach. Thanks, Rakesh. >=20 > - Felix