mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian A. Ehrhardt" <lk@c--e.de>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
	linux-netdev@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.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: Sat, 3 Feb 2024 19:20:47 +0100	[thread overview]
Message-ID: <Zb6D/5R8nNrxveAP@cae.in-ulm.de> (raw)
In-Reply-To: <CABXGCsNnUfCCYVSb_-j-a-cAdONu1r6Fe8p2OtQ5op_wskOfpw@mail.gmail.com>

On Sat, Feb 03, 2024 at 06:02:15AM +0500, Mikhail Gavrilov wrote:
> Hi,
> I'm trying to find the first bad commit that led to a decreased
> network outgoing speed.
> And every time I come to a huge merge [Merge tag 'usb-6.8-rc1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb]
> I have already triple-checked all my answers and speed measurements.
> I don't understand where I'm making a mistake.
> 
> Let's try to figure it out together.
> 
> Input data:
> Two computers connected 1Gbps link.
> Both have the same hardware.
> Network: RTL8125 2.5GbE Controller (rev 05)
> 
> When I copy files from one computer to another and kernel snapshot
> builded from commit 296455ade1fd I have 97-110MB/sec which is almost
> max speed of 1Gbps link.
> When I move to commit 9d1694dc91ce I have only 66-70MB/sec which is
> significantly slower.
> 
> I bisected the issue by measuring network speed on each step.
> I save all results to file [1]
> 
> [1] file is attached as a zip archive.
> 
> # first bad commit: [8c94ccc7cd691472461448f98e2372c75849406c] Merge
> tag 'usb-6.8-rc1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

So (simplified) the change history looks something like this:

   branch point  296455ade1fd (good)     9d1694dc91ce (merge, bad)
       |             |                         |
 ----- * ----------- * ----------------------- * --------------  <- master
        \                                     /
	  ----------- * ---------------------   <- development branch
	              |
		  Bug introduced here

The straight line is Linus' master branch. At some point in the
past a development branch was forked from Linus's branch (the
lower line). During that development the regression was introduced
and when the branch was merged back the master branch started to
have the regression.

To further pin point the bug in the development branch you'll have to
bisect along the lower line.

So how do you do this:

Look at the merge:
$ git cat-file -p 9d1694dc91ce | head -n3
tree d9093aecb9261cccaea1f0a58887fcd9db542172
parent e9a5a78d1ad8ceb4e3df6d6ad93360094c84ac40
parent b2e792ae883a0aa976d4176dfa7dc933263440ea

So the merge commit has two parent commits, one is on the master
branch, the other is on the development branch. To find out which
of the parents is on the development branch you can ask git to find
the common ancestor of the two parent commits and your good commit
on the master branch:

$ git merge-base 296455ade1fd e9a5a78d1ad8ceb4e3df6d6ad93360094c84ac40
296455ade1fdcf5f8f8c033201633b60946c589a
$ git merge-base 296455ade1fd b2e792ae883a0aa976d4176dfa7dc933263440ea
587371ed783b046f22ba7a5e1cc9a19ae35123b4

So the second parent is not on the master branch and the merge base
(i.e. the point where the development branch was forked from the master
branch) is 587371ed783b046f22ba7a5e1cc9a19ae35123b4.

So I'd assume that 587371ed783b046f22ba7a5e1cc9a19ae35123b4 is a good
commit and b2e792ae883a0aa976d4176dfa7dc933263440ea is a bad commit.
You can verify this and then start bisecting like this for better
results:
$ git bisect good 587371ed783b046f22ba7a5e1cc9a19ae35123b4
$ git bisect bad b2e792ae883a0aa976d4176dfa7dc933263440ea

      regards   Christian


  parent reply	other threads:[~2024-02-03 18:20 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 [this message]
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
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=Zb6D/5R8nNrxveAP@cae.in-ulm.de \
    --to=lk@c--e.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-netdev@vger.kernel.org \
    --cc=mikhail.v.gavrilov@gmail.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®