mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: "Christian A. Ehrhardt" <lk@c--e.de>,
	niklas.neronin@linux.intel.com,
	Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: Re: This is the fourth time I’ve tried to find what led to the regression of outgoing network speed and each time I find the merge commit 8c94ccc7cd691472461448f98e2372c75849406c
Date: Thu, 8 Feb 2024 11:25:20 +0200	[thread overview]
Message-ID: <1126ed0a-bfc1-a752-1b5e-f1339d7a8aa5@linux.intel.com> (raw)
In-Reply-To: <CABXGCsPdXqRG6v97KDGy+o59xc3ayaq3rLj267veC7YcKVp8ww@mail.gmail.com>

On 7.2.2024 13.55, Mikhail Gavrilov wrote:
> On Wed, Feb 7, 2024 at 3:39 PM Mathias Nyman
> <mathias.nyman@linux.intel.com> wrote:
>>
>> Thanks,
>>
>> Looks like your network adapter ends up interrupting CPU0 in the bad case due
>> to the change in how many interrupts are requested by xhci_hcd before it.
>>
>> bad case:
>>          CPU0    CPU1    ...     CPU31
>> 87:     18213809 0      ...     0       IR-PCI-MSIX-0000:0e:00.0    0-edge      enp14s0
>>
>> Does manually changing it to some other CPU help? picking one that doesn't already
>> handle a lot of interrupts. CPU0 could also in general be more busy, possibly spending
>> more time with interrupts disabled.
>>
>> For example change to CPU23 in the bad case:
>>
>> echo 800000 > /proc/irq/87/smp_affinity
>>
>> Check from proc/interrupts that enp14s0 interrupts actually go to CPU23 after this.
>>
>> Thanks
>> Mathias
>>
> 
> root@secondary-ws ~# iperf3 -c primary-ws.local -t 5 -p 5000 -P 1
> Connecting to host primary-ws.local, port 5000
> [  5] local 192.168.1.130 port 49152 connected to 192.168.1.96 port 5000
> [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
> [  5]   0.00-1.00   sec  70.9 MBytes   594 Mbits/sec    0    376 KBytes
> [  5]   1.00-2.00   sec  72.4 MBytes   607 Mbits/sec    0    431 KBytes
> [  5]   2.00-3.00   sec  73.1 MBytes   613 Mbits/sec    0    479 KBytes
> [  5]   3.00-4.00   sec  72.4 MBytes   607 Mbits/sec    0    501 KBytes
> [  5]   4.00-5.00   sec  73.2 MBytes   614 Mbits/sec    0    501 KBytes
> - - - - - - - - - - - - - - - - - - - - - - - - -
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec   362 MBytes   607 Mbits/sec    0             sender
> [  5]   0.00-5.00   sec   360 MBytes   603 Mbits/sec                  receiver
> 
> iperf Done.
> root@secondary-ws ~# echo 800000 > /proc/irq/87/smp_affinity
> root@secondary-ws ~# iperf3 -c primary-ws.local -t 5 -p 5000 -P 1
> Connecting to host primary-ws.local, port 5000
> [  5] local 192.168.1.130 port 37620 connected to 192.168.1.96 port 5000
> [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
> [  5]   0.00-1.00   sec   111 MBytes   934 Mbits/sec    0    621 KBytes
> [  5]   1.00-2.00   sec   109 MBytes   913 Mbits/sec    0    621 KBytes
> [  5]   2.00-3.00   sec   110 MBytes   920 Mbits/sec    0    621 KBytes
> [  5]   3.00-4.00   sec   110 MBytes   924 Mbits/sec    0    621 KBytes
> [  5]   4.00-5.00   sec   109 MBytes   917 Mbits/sec    0    621 KBytes
> - - - - - - - - - - - - - - - - - - - - - - - - -
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-5.00   sec   549 MBytes   921 Mbits/sec    0             sender
> [  5]   0.00-5.00   sec   547 MBytes   916 Mbits/sec                  receiver
> 
> iperf Done.
> 
> Very interesting, is CPU0 slower than CPU23 by 30%?
> 

My guess is that CPU0 spends more time with interrupts disabled than other CPUs.
Either because it's handling interrupts from some other hardware, or running
code that disables interrupts (for example kernel code inside spin_lock_irq),
and thus not able to handle network adapter interrupts at the same rate as CPU23

Thanks
Mathias


  reply	other threads:[~2024-02-08  9:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03  1:02 Mikhail Gavrilov
2024-02-03  1:08 ` Rahul Rameshbabu
2024-02-03  1:15 ` Randy Dunlap
2024-02-03  1:16   ` Randy Dunlap
2024-02-03  2:32     ` Jakub Kicinski
2024-02-03 18:20 ` Christian A. Ehrhardt
2024-02-04 20:47   ` Christian A. Ehrhardt
2024-02-05 21:08     ` Mikhail Gavrilov
2024-02-06 11:26       ` Mathias Nyman
2024-02-06 16:12         ` Mikhail Gavrilov
2024-02-07 10:40           ` Mathias Nyman
2024-02-07 11:55             ` Mikhail Gavrilov
2024-02-08  9:25               ` Mathias Nyman [this message]
2024-02-08 10:32                 ` Mikhail Gavrilov
2024-02-08 15:43                   ` Mathias Nyman
2024-02-16  6:15                     ` This is the fourth time Iâve " Linux regression tracking (Thorsten Leemhuis)
2024-02-19  9:41                     ` This is the fourth time I’ve " Mikhail Gavrilov
2024-02-20 23:19                       ` Mikhail Gavrilov
2024-02-20 23:41                         ` Randy Dunlap
2024-02-20 23:43                           ` Randy Dunlap
2024-02-21 13:44                             ` Mathias Nyman
2024-02-26  5:45                               ` This is the fourth time I've " Linux regression tracking (Thorsten Leemhuis)
2024-02-26  9:24                                 ` Mathias Nyman
2024-02-26  9:51                                   ` Linux regression tracking (Thorsten Leemhuis)
2024-02-26 10:54                                     ` Mathias Nyman
2024-02-26 18:09                                       ` Thomas Gleixner
2024-02-27 17:08                                         ` mikhail.v.gavrilov
2024-02-27 17:23                                           ` Thomas Gleixner
     [not found]                                             ` <960fd112b294a902e1bea1fdd8e04a708a05cf45.camel@gmail.com>
2024-02-29  9:41                                               ` Mikhail Gavrilov
2024-03-04 14:10                                     ` Linux regression tracking (Thorsten Leemhuis)
2024-02-21  6:48 ` This is the fourth time I’ve " Linux regression tracking #adding (Thorsten Leemhuis)

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=1126ed0a-bfc1-a752-1b5e-f1339d7a8aa5@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lk@c--e.de \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=niklas.neronin@linux.intel.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

all inboxes | Powered by JetHome®