[lkml]   [2003]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [BENCHMARK] Lmbench 2.5.54-mm2 (impressive improvements)
Followup to:  <>
By author: Linus Torvalds <>
In newsgroup:
> Now, that SYSENTER_CS thing is very rare indeed, and by keeping track of
> what the previous value was (ie just caching the SYSENTER_CS value in the
> thread_struct), we could get rid of it with a conditional jump instead.
> Want to try it?

This seems like the first thing to do.

Dealing with the SYSENTER_ESP issue is a lot tricker. It seems that
it can be done with a magic EIP range test in the #DB handler, the
range is the part that finds the top of the real kernel stack and
pushfl's to it; the #DB handler if it receives a trap in this region
could emulate this piece of code (including pushing the pre-exception
flags onto the stack) and then invoke the instruction immediately
after the pushf..

Yes, it's ugly, but it should be relatively straightforward, and since
this particular chunk is assembly code by necessity it shouldn't be

The other variant (which I have suggested) is to simply state "TF set
in user space is not honoured." This would require a system call to
set TF -> 1. That way the kernel already has the TF state for all

Again, it's ugly.


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot." <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.051 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site