From: Peter Bergner <bergner@brule.borg.umn.edu>
To: Paul Mackerras <paulus@samba.org>
Cc: Mike Corrigan <mikejc@us.ibm.com>,
Anton Blanchard <anton@samba.org>,
linuxPPC Dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: FP save/restore code in ppc32/ppc64 kernels
Date: Tue, 13 Aug 2002 21:20:37 -0500 [thread overview]
Message-ID: <20020813212037.A926908@brule.borg.umn.edu> (raw)
In-Reply-To: <20020812143430.GA35003@congo.borg.umn.edu>
Peter Bergner wrote:
: Paul Mackerras wrote:
:: Exactly. We don't. If we did then we could do as you say and it
:: would work on SMP. We could do that as long as we are sure we won't
:: ever want to do a UP kernel on ppc64...
:
: Or we could force the UP kernel to act like the SMP kernel and not
: use lazy save. How big of a "win" is lazy save on UP kernels?
: I will also note that UP kernels haven't worked for nearly 2 years
: on PPC64.
Nevermind. I came up with an idea where we can keep the FE{0,1}
bits in the MSR (no need to reset them in giveup_fpu() and assuming
we clear the fpscr in giveup_fpu()) and the UP kernel can continue
to do lazy save of the FP state.
Now if we did nothing more than the above, then we can have a problem
of process A with FE{0,1} == 1,1 and fpscr == 0 could see the fpscr
results of process B with FE{0,1} == 0,0 and fpscr != 0 with lazy
save. However, while switching process A back in, we can check
whether process A's FE{0,1} bits are non zero. If either of the
bits are set, we can call giveup_fpu() right there.
The problem with the above idea is that currently, all processes
run with a default FE{0,1} == 1,1, so we'd end up calling giveup_fpu()
on each task switch. OTOH, if we ran with FE{0,1} == 0,0 as default
values, then that would occur only for those processes that explicitly
change their FE{0,1} bits to something other than 0,0. We can go
further by testing that last_task_math_used != current as well.
As for 0,0 as default values for FE{0,1}, I ran a copy of tomcatv
(spec92) on an sstar processor and was seeing about a 40%-45%
performance regression when running with FE{0,1} == 1,1 versus 0,0
(fpscr set to ignore exceptions in both cases). I'd like to run
more tests as well as seeing what the results look like across
different processors, particularly on POWER4. I'll keep you posted.
Peter
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-08-14 2:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 14:01 FP save/restore code in ppc32/ppc64 kernels Mike Corrigan
2002-08-08 22:34 ` Paul Mackerras
2002-08-09 2:09 ` Peter Bergner
2002-08-12 2:38 ` Paul Mackerras
2002-08-12 14:34 ` Peter Bergner
2002-08-14 2:20 ` Peter Bergner [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-08-07 16:23 Peter Bergner
2002-08-08 11:46 ` Anton Blanchard
2002-08-08 13:18 ` Anton Blanchard
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=20020813212037.A926908@brule.borg.umn.edu \
--to=bergner@brule.borg.umn.edu \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=mikejc@us.ibm.com \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).