Messages in this thread | | | Subject | Re: [patch 1/2] sLeAZY FPU feature - x86_64 support | From | Arjan van de Ven <> | Date | Sat, 01 Jul 2006 23:56:06 +0200 |
| |
> > However I'm not sure 256 is a good number. It seems a bit too high.
it's 256 context switches... if you care about context switch cycles you'll do many, and 256 isn't a lot ;)
(remember that this is after 5 *consecutive* fpu uses, not just 5 uses total, to you're really a heavy fpu user if you hit that)
> > > Index: linux-2.6.17-sleazyfpu/arch/x86_64/kernel/process.c > > =================================================================== > > --- linux-2.6.17-sleazyfpu.orig/arch/x86_64/kernel/process.c > > +++ linux-2.6.17-sleazyfpu/arch/x86_64/kernel/process.c > > @@ -515,6 +515,10 @@ __switch_to(struct task_struct *prev_p, > > int cpu = smp_processor_id(); > > struct tss_struct *tss = &per_cpu(init_tss, cpu); > > > > + /* we're going to use this soon, after a few expensive things */ > > + if (next_p->fpu_counter>5) > > + prefetch(&next->i387.fxsave); > > Did you measure this prefetch makes a difference? I would expect it to > be too soon to be really worth while (normally you need hundreds of > instructions for them to make sense and that's probably not the case here)
s/instructions/cycles/
well there are 4 segment loads, a few msr accesses, a few PDA writes and optionally even the fxsave of the old task inbetween the prefetch and the use of the memory; those do add up *bigtime*...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |