Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-07 Thread Andy Lutomirski
On Wed, May 7, 2014 at 4:14 AM, Ingo Molnar wrote: > > * Andy Lutomirski wrote: > >> > Whatever. I got enough profile data to say that it seems to have >> > cut 'iret' overhead by at least two thirds. So it may not *work*, >> > but from a "hey look, some random numbers" standpoint it is worth >>

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-07 Thread Ingo Molnar
* Andy Lutomirski wrote: > > Whatever. I got enough profile data to say that it seems to have > > cut 'iret' overhead by at least two thirds. So it may not *work*, > > but from a "hey look, some random numbers" standpoint it is worth > > playing with. > > :) > > Is there actual interest in

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Måns Rullgård
Steven Rostedt writes: > On Tue, 6 May 2014 14:48:50 -0700 > Linus Torvalds wrote: > >> Yeah, it's disgusting. I think it is worth fixing to get better >> numbers (it *would* be very interesting to hear whether this plus the >> kernel 'retq' thing actually makes real device interrupt overhead >>

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Steven Rostedt
On Tue, 6 May 2014 14:48:50 -0700 Linus Torvalds wrote: > Yeah, it's disgusting. I think it is worth fixing to get better > numbers (it *would* be very interesting to hear whether this plus the > kernel 'retq' thing actually makes real device interrupt overhead > lower), but I'd be very wary of

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Linus Torvalds
On Tue, May 6, 2014 at 2:34 PM, Andy Lutomirski wrote: > > I don't think that's enough to fix this -- interrupts may not have > been on in the first place, I think. I wonder if __put_user_inatomic > would work here. That might be the way to go, yes. And in addition to the CS value you should pr

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Linus Torvalds
On Tue, May 6, 2014 at 2:25 PM, Linus Torvalds wrote: > > Whatever. I got enough profile data to say that it seems to have cut > 'iret' overhead by at least two thirds. So it may not *work*, but from > a "hey look, some random numbers" standpoint it is worth playing with. Just to clarify: that's

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Andy Lutomirski
On Tue, May 6, 2014 at 2:25 PM, Linus Torvalds wrote: > On Tue, May 6, 2014 at 2:00 PM, Linus Torvalds > wrote: >> >> I'll do profiles and test the kernel compile too, but the raw timings >> are certainly promising. The "sysret" hack is pretty disgusting, and >> it's broken too. sysret doesn't do

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Linus Torvalds
On Tue, May 6, 2014 at 2:00 PM, Linus Torvalds wrote: > > I'll do profiles and test the kernel compile too, but the raw timings > are certainly promising. The "sysret" hack is pretty disgusting, and > it's broken too. sysret doesn't do some things iret does (like TF flag > etc), so it's not comple

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Linus Torvalds
On Tue, May 6, 2014 at 1:35 PM, Linus Torvalds wrote: > > Heh. That is pretty disgusting. But I guess it could be interesting > for timing. BRB. Ooh. That's friggin impressive. Guys, see if you can recreate these numbers. This is my totally disgusting test-case, which really is just stress-testi

Re: [ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Linus Torvalds
On Tue, May 6, 2014 at 1:29 PM, Andy Lutomirski wrote: > > The only reason it's Signed-off-by is that I agree to the DCO. > That should not be construed to mean that anyone should apply > this patch. It's an abomination and it will do terrible, > terrible things. Heh. That is pretty disgusting.

[ABOMINATION] x86: Fast interrupt return to userspace

2014-05-06 Thread Andy Lutomirski
This could be even faster if it were written in assembler :) The only reason it's Signed-off-by is that I agree to the DCO. That should not be construed to mean that anyone should apply this patch. It's an abomination and it will do terrible, terrible things. It boots, though :) I haven't teste