All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Herton Krzesinski <hkrzesin@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, olichtne@redhat.com,
	atomasov@redhat.com, aokuliar@redhat.com
Subject: Re: [PATCH] x86: add back the alignment of the destination to 8 bytes in copy_user_generic()
Date: Sun, 16 Mar 2025 12:09:47 +0100	[thread overview]
Message-ID: <Z9axe9Ac5biyJjCC@gmail.com> (raw)
In-Reply-To: <Z9au20vtMSXCbdXu@gmail.com>


* Ingo Molnar <mingo@kernel.org> wrote:

> > It does look good in my testing here, I built same kernel I was 
> > using for testing the original patch (based on 6.14-rc6), this is 
> > one of the results I got in one of the runs testing on the same 
> > machine:
> > 
> >              CPU      RATE          SYS          TIME     sender-receiver
> > Server bind   19: 20.8Gbits/sec 14.832313000 20.863476111 75.4%-89.2%
> > Server bind   21: 18.0Gbits/sec 18.705221000 23.996913032 80.8%-89.7%
> > Server bind   23: 20.1Gbits/sec 15.331761000 21.536657212 75.0%-89.7%
> > Server bind none: 24.1Gbits/sec 14.164226000 18.043132731 82.3%-87.1%
> > 
> > There are still some variations between runs, which is expected as 
> > was the same when I tested my patch or in the not aligned case, but 
> > it's consistently better/higher than the no align case. Looks 
> > really it's sufficient to align for the higher than or equal 64 
> > bytes copy case.
> 
> Mind sending a v2 patch with a changelog and these benchmark numbers 
> added in, and perhaps a Co-developed-by tag with Linus or so?

BTW., if you have a test system available, it would be nice to test a 
server CPU in the Intel spectrum as well. (For completeness mostly, I'd 
not expect there to be as much alignment sensitivity.)

The CPU you tested, AMD Epyc 7742 was launched ~6 years ago so it's 
still within the window of microarchitectures we care about. An Intel 
test would be nice from a similar timeframe as well. Older is probably 
better in this case, but not too old. :-)

( Note that the Intel test is not required to apply the fix IMO - we 
  did change alignment patterns ~2 years ago in a5624566431d which 
  regressed. )

Thanks,

	Ingo

  reply	other threads:[~2025-03-16 11:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 17:53 Performance issues in copy_user_generic() in x86_64 Herton R. Krzesinski
2025-03-14 17:53 ` [PATCH] x86: add back the alignment of the destination to 8 bytes in copy_user_generic() Herton R. Krzesinski
2025-03-14 19:06   ` Linus Torvalds
2025-03-14 20:33     ` Herton Krzesinski
2025-03-16 10:58       ` Ingo Molnar
2025-03-16 11:09         ` Ingo Molnar [this message]
2025-03-17 13:18           ` Herton Krzesinski
2025-03-18 21:59           ` David Laight
2025-03-18 22:50             ` Herton Krzesinski
2025-03-19 13:07               ` David Laight
2025-03-17 13:16     ` David Laight
2025-03-17 21:29       ` Linus Torvalds
2025-03-17 22:32         ` David Laight

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=Z9axe9Ac5biyJjCC@gmail.com \
    --to=mingo@kernel.org \
    --cc=aokuliar@redhat.com \
    --cc=atomasov@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hkrzesin@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=olichtne@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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.