From: Arjan van de Ven <arjan@infradead.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [patch 1/2] sLeAZY FPU feature - x86_64 support
Date: Sat, 01 Jul 2006 23:56:06 +0200 [thread overview]
Message-ID: <1151790966.3195.66.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <200607012349.36091.ak@suse.de>
>
> 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*...
next prev parent reply other threads:[~2006-07-01 21:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-01 17:11 [patch 0/2] sLeAZY FPU feature Arjan van de Ven
2006-07-01 17:12 ` [patch 1/2] sLeAZY FPU feature - x86_64 support Arjan van de Ven
2006-07-01 21:49 ` Andi Kleen
2006-07-01 21:56 ` Arjan van de Ven [this message]
2006-07-01 17:13 ` [patch 2/2] sLeAZY FPU feature - i386 support Arjan van de Ven
2006-07-01 17:40 ` [patch 0/2] sLeAZY FPU feature Nick Piggin
2006-07-01 19:42 ` Arjan van de Ven
2006-07-02 1:39 [patch 1/2] sLeAZY FPU feature - x86_64 support Voluspa
2006-07-02 7:39 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1151790966.3195.66.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®