public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Cc: <ath12k@lists.infradead.org>,  <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/3] wifi: ath12k: Optimize the lock contention of used list in Rx data path
Date: Tue, 19 Mar 2024 18:44:11 +0200	[thread overview]
Message-ID: <87il1ib290.fsf@kernel.org> (raw)
In-Reply-To: <1e9c36d9-0a2a-e458-a727-9630746b24e7@quicinc.com> (Karthikeyan Periyasamy's message of "Tue, 19 Mar 2024 15:07:50 +0530")

Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:

> On 3/18/2024 11:39 PM, Kalle Valo wrote:
>
>> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>>
>>> On 3/11/2024 6:35 PM, Kalle Valo wrote:
>>>> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>>>>
>>>>> When a packet arrives in Rx rings, the RX descriptor moves from the used
>>>>> list to the free list. Then, the rxdma ring gets replenished, where the Rx
>>>>> descriptor again moves from the free list to the used list. At the end, the
>>>>> descriptor came to the used list with unnecessary list movement. The
>>>>> descriptor used list is maintained in the Rxdma ring structure, which
>>>>> creates lock contention for the list operations (add, delete) in the Rx
>>>>> data path. Optimize the Rx data path by removing the used list from the
>>>>> common Rxdma ring and maintain as a local variable in the Rx ring handler
>>>>> itself, which avoid lock contention. Now, to find the used list descriptor
>>>>> during descriptor cleanup, we need to check the in_use flag for each Rx
>>>>> descriptor.
>>>>>
>>>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>>>>
>>>>> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
>>>> Before looking at this in detail: When optimising something it would be
>>>> good to have before and after numbers showing the improvement. Otherwise
>>>> it's just wishful thinking.
>>> I don't have numbers. Like you said, Its just a wishful think.
>> So do you still want us to take this?
>>
>> In the future please do provide numbers to show that the optimisation
>> really helps as intended. Otherwise we might even go backwards.
>
> This is a simple UDP UL throughput test case results on x86+NUC device
> with QCN9274 card
>
> Before:
> Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft
> %steal  %guest  %gnice   %idle
> Average:     all    0.24    0.00   12.54    0.08    0.00 23.33   
> 0.00    0.00    0.00   63.81
>
> After:
> Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft
> %steal  %guest  %gnice   %idle
> Average:     all    0.34    0.00    4.60    0.00    0.00 19.59   
> 0.00    0.00    0.00   75.47
>
> is it fine to capture in the commit log ?

Thanks, exactly something like that helps to show that the optimisation
is helping. Please also include your analysis of the results in the
commit message.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2024-03-19 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 16:23 [PATCH 0/3] wifi: ath12k: Optimize the lock contention in Rx data path Karthikeyan Periyasamy
2024-02-26 16:23 ` [PATCH 1/3] wifi: ath12k: Refactor Rxdma buffer replinish argument Karthikeyan Periyasamy
2024-02-26 18:32   ` Jeff Johnson
2024-02-26 16:23 ` [PATCH 2/3] wifi: ath12k: Optimize the lock contention of used list in Rx data path Karthikeyan Periyasamy
2024-02-26 18:44   ` Jeff Johnson
2024-03-11 13:05   ` Kalle Valo
2024-03-11 13:55     ` Karthikeyan Periyasamy
2024-03-18 18:09       ` Kalle Valo
2024-03-19  9:37         ` Karthikeyan Periyasamy
2024-03-19 16:44           ` Kalle Valo [this message]
2024-02-26 16:23 ` [PATCH 3/3] wifi: ath12k: Refactor error handler of Rxdma replenish Karthikeyan Periyasamy
2024-02-26 18:45   ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87il1ib290.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_periyasa@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox