Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1695024
| From | ebiederm@xmission.com (Eric W. Biederman) |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Simplfying copy_siginfo_to_user |
| Date | 2017-07-24 21:20 +0200 |
| Message-ID | <u6R3A-KM-29@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <u4BvZ-3ta-49@gated-at.bofh.it> <u4E0N-4S6-13@gated-at.bofh.it> <u4EDw-5m6-9@gated-at.bofh.it> <u69lV-6vS-7@gated-at.bofh.it> <u6PEt-87k-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Linus Torvalds <torvalds@linux-foundation.org> writes: > On Sat, Jul 22, 2017 at 1:25 PM, Eric W. Biederman > <ebiederm@xmission.com> wrote: >> I played with some clever changes such as limiting the copy to 48 bytes, >> disabling the memset and the like but I could not get a strong enough >> signal to say that any one change removed the extra or a clear part of >> it 20ns. > > What CPU did you use? Because the SMAP bit in particular matters. > > The field-by-field copies are extremely slow on modern CPU's that > implement SMAP, unless you also use the special "unsafe_put_user()" > code (or the nasty old put_user_ex() code that some of the x86 signal > code uses). > > So one of the advantages of just copy_to_user() ends up being visible > only on Broadwell+ (or whatever the SMAP cutoff is). Good point. The cpu I was testing on was an AMD A10. I don't actually have a cpu that supports SMAP handy. If you would like I can post the minimal patches and benckmark so anyone who is interested could reproduce this for themselves. I suspect that if it is down to only 20ns without SMAP this will definitely be a performance improvement in the presence of SMAP. Eric
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] signal: Fix sending signals with siginfo ebiederm@xmission.com (Eric W. Biederman) - 2017-07-18 16:20 +0200
[PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes Oleg Nesterov <oleg@redhat.com> - 2017-07-20 18:20 +0200
Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes ebiederm@xmission.com (Eric W. Biederman) - 2017-07-21 04:50 +0200
[PATCH 4/7] signal/mips: Document a conflict with SI_USER with SIGFPE "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
[PATCH 3/7] signal/sparc: Document a conflict with SI_USER with SIGFPE "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
[PATCH 1/7] signal/alpha: Document a conflict with SI_USER for SIGTRAP "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
Re: [PATCH 1/7] signal/alpha: Document a conflict with SI_USER for SIGTRAP Richard Henderson <rth@twiddle.net> - 2017-07-18 20:30 +0200
Re: [PATCH 7/7] signal: Remove kernel interal si_code magic Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-18 19:00 +0200
Re: [PATCH 7/7] signal: Remove kernel interal si_code magic ebiederm@xmission.com (Eric W. Biederman) - 2017-07-18 19:40 +0200
Simplfying copy_siginfo_to_user ebiederm@xmission.com (Eric W. Biederman) - 2017-07-22 22:40 +0200
Re: Simplfying copy_siginfo_to_user Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-24 19:50 +0200
Re: Simplfying copy_siginfo_to_user ebiederm@xmission.com (Eric W. Biederman) - 2017-07-24 21:20 +0200
Re: Simplfying copy_siginfo_to_user Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-25 03:40 +0200
csiph-web