Skip to contentSkip to conversation

i386: use thread_info flags for debug regs and IO bitmaps

PATCH Chuck Ebbert 3 participants 3 messages Jul 9, 2006 – Jul 10, 2006

lore
Share & tools
lore
#0 lore raw

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_DEBUG to track when debug registers are active
- add TIF_IO_BITMAP to track when I/O bitmap is used
- modify __switch_to() to use the new TIF flags

Can 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
#1 lore raw
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

#2 lore raw
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