i386: use thread_info flags for debug regs and IO bitmaps
In-Reply-To: <[email protected]>
Quoted 5 lines · Linus Torvalds
Quoted 3 lines · Chuck Ebbert
From: Stephane Eranian <[email protected]>
Quoted 7 lines
Quoted 5 lines
Use thread info flags to track use of debug registers and IO bitmaps.
- add
TIF_DEBUGto track when debug registers are active
- addTIF_IO_BITMAPto track when I/O bitmap is used
- modify__switch_to()to use the new TIF flagsCan you explain what the advantages of this are?
Stephane's perfmon2 patch adds yet another special-case to the switch_to() code, so Andi suggested this change. It will allow the perfmon2 patch to have no performance impact on normal task-switching, since it will just use another flag.
After I saw a ~7% gain in task-switch performance, I like it now even without perfmon2 in there.
Quoted 4 lines
I don't see it. It's just creating new state to describe state that we already had, and as far as I can tell, it's just a way to potentially have more new bugs thanks to the new state getting out of sync with the old one?
Well yeah, there is that. But Andi and I both reviewed it and he's already put the x86_64 version into his tree. Testing in -mm should show whether there are any problems.
Signature · 2 lines
Chuck "You can't read a newspaper if you can't read." --George W. Bush
Quoted 3 lines · Chuck Ebbert
After I saw a ~7% gain in task-switch performance, I like it now even without perfmon2 in there.
So is the 7% performance gain visible with just that single patch (presumably because it avoids a cache miss associated with reading the processor state further away?)
If you have performance improvement numbers for just this one patch, I have no objections (but it would be good to then make those numbers part of the commit message).
Linus
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Chuck Ebbert
After I saw a ~7% gain in task-switch performance, I like it now even without perfmon2 in there.
So is the 7% performance gain visible with just that single patch
It came from lmbench which is not particularly stable for context switch times. Might well be an artifact. It sounds too much too.
-Andi