All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Tejun Heo <tj@kernel.org>
Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, Amitkumar Karwar <amitkarwar@gmail.com>,
	Ganapathi Bhat <ganapathi017@gmail.com>,
	Sharvari Harisangam <sharvari.harisangam@nxp.com>,
	Xinming Hu <huxinming820@gmail.com>,
	Kalle Valo <kvalo@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	Pin-yen Lin <treapking@chromium.org>
Subject: Re: [PATCH 02/13] wifi: mwifiex: Use default @max_active for workqueues
Date: Wed, 10 May 2023 11:57:41 -0700	[thread overview]
Message-ID: <ZFvpJb9Dh0FCkLQA@google.com> (raw)
In-Reply-To: <ZFvfYK-u8suHjPFw@slm.duckdns.org>

Hi,

On Wed, May 10, 2023 at 08:16:00AM -1000, Tejun Heo wrote:
> > While I'm here: we're still debugging what's affecting WiFi performance
> > on some of our WiFi systems, but it's possible I'll be turning some of
> > these into struct kthread_worker instead. We can cross that bridge
> > (including potential conflicts) if/when we come to it though.
> 
> Can you elaborate the performance problem you're seeing? I'm working on a
> major update for workqueue to improve its locality behavior, so if you're
> experiencing issues on CPUs w/ multiple L3 caches, it'd be a good test case.

Sure!

Test case: iperf TCP RX (i.e., hits "MWIFIEX_RX_WORK_QUEUE" a lot) at
some of the higher (VHT 80 MHz) data rates.

Hardware: Mediatek MT8173 2xA53 (little) + 2xA72 (big) CPU
(I'm not familiar with its cache details)
+
Marvell SD8897 SDIO WiFi (mwifiex_sdio)

We're looking at a major regression from our 4.19 kernel to a 5.15
kernel (yeah, that's downstream reality). So far, we've found that
performance is:

(1) much better (nearly the same as 4.19) if we add WQ_SYSFS and pin the
work queue to one CPU (doesn't really matter which CPU, as long as it's
not the one loaded with IRQ(?) work)

(2) moderately better if we pin the CPU frequency (e.g., "performance"
cpufreq governor instead of "schedutil")

(3) moderately better (not quite as good as (2)) if we switch a
kthread_worker and don't pin anything.

We tried (2) because we saw a lot more CPU migration on kernel 5.15
(work moves across all 4 CPUs throughout the run; on kernel 4.19 it
mostly switched between 2 CPUs).

We tried (3) suspecting some kind of EAS issue (instead of distributing
our workload onto 4 different kworkers, our work (and therefore our load
calculation) is mostly confined to a single kernel thread). But it still
seems like our issues are more than "just" EAS / cpufreq issues, since
(2) and (3) aren't as good as (1).

NB: there weren't many relevant mwifiex or MTK-SDIO changes in this
range.

So we're still investigating a few other areas, but it does seem like
"locality" (in some sense of the word) is relevant. We'd probably be
open to testing any patches you have, although it's likely we'd have the
easiest time if we can port those to 5.15. We're constantly working on
getting good upstream support for Chromebook chips, but ARM SoC reality
is that it still varies a lot as to how much works upstream on any given
system.

Thanks,
Brian

  reply	other threads:[~2023-05-10 18:57 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  1:50 [PATCHSET v2 wq/for-6.5-cleanup-ordered] workqueue: Ordered workqueue creation cleanup Tejun Heo
2023-05-09  1:50 ` [PATCH 01/13] scsi: ncr53c8xx: Use default @max_active for hostdata->work_q Tejun Heo
2023-05-21  2:48   ` [PATCH RESEND " Tejun Heo
2023-05-21  6:42     ` Finn Thain
2023-05-22 22:06     ` Martin K. Petersen
2023-05-23  0:58       ` Tejun Heo
2023-05-09  1:50 ` [PATCH 02/13] wifi: mwifiex: Use default @max_active for workqueues Tejun Heo
2023-05-10  8:45   ` Kalle Valo
2023-05-10 18:09   ` Brian Norris
2023-05-10 18:16     ` Tejun Heo
2023-05-10 18:57       ` Brian Norris [this message]
2023-05-10 19:19         ` Tejun Heo
2023-05-10 19:50           ` Brian Norris
2023-05-19  0:36   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 03/13] dm integrity: Use alloc_ordered_workqueue() to create ordered workqueues Tejun Heo
2023-05-09  1:50   ` [dm-devel] " Tejun Heo
2023-05-25 22:10   ` Tejun Heo
2023-05-25 22:10     ` [dm-devel] " Tejun Heo
2023-05-09  1:50 ` [PATCH 04/13] media: amphion: " Tejun Heo
2023-05-23 12:19   ` Hans Verkuil
2023-05-23 21:25     ` Tejun Heo
2023-05-09  1:50 ` [PATCH 05/13] wifi: ath10/11/12k: " Tejun Heo
2023-05-10  8:41   ` Kalle Valo
2023-05-19  0:41   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 06/13] net: wwan: t7xx: " Tejun Heo
2023-05-25 22:11   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 07/13] soc: qcom: qmi: " Tejun Heo
2023-05-09  1:50 ` [PATCH 08/13] btrfs: " Tejun Heo
2023-05-09 14:53   ` David Sterba
2023-05-09 15:57     ` Tejun Heo
2023-05-09 23:36       ` David Sterba
2023-05-09 23:47         ` Tejun Heo
2023-05-25 23:33           ` Tejun Heo
2023-05-26 12:52             ` David Sterba
2023-05-09  1:50 ` [PATCH 09/13] net: qrtr: " Tejun Heo
2023-05-25 22:14   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 10/13] rxrpc: " Tejun Heo
2023-05-25 22:14   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 11/13] crypto: octeontx2: " Tejun Heo
2023-05-09  2:18   ` Herbert Xu
2023-05-19  0:42   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 12/13] media: coda: " Tejun Heo
2023-05-09 10:46   ` Philipp Zabel
2023-05-19  0:50   ` Tejun Heo
2023-05-09  1:50 ` [PATCH 13/13] workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1 ordered Tejun Heo

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=ZFvpJb9Dh0FCkLQA@google.com \
    --to=briannorris@chromium.org \
    --cc=amitkarwar@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ganapathi017@gmail.com \
    --cc=huxinming820@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sharvari.harisangam@nxp.com \
    --cc=tj@kernel.org \
    --cc=treapking@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.