From: Michael Neuling <mikey@neuling.org>
To: "Morrison, Tom" <tmorrison@empirix.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: MSR_SPE - being turned off...
Date: Wed, 06 May 2009 10:01:39 +1000 [thread overview]
Message-ID: <13221.1241568099@neuling.org> (raw)
In-Reply-To: <BD261180E6D35F4D9D32F3E44FD3D90110C30D34@EMPBEDEX.empirix.com>
> Hi Kumar/Michael...
>
> Sorry, I really didn't explain myself very well...
>
> The Problem (answer to Michael):
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D
> We started using a new compiler that upon -O2 optimization - added
> heavy SPE related instructions into our applications (where the older
> compiler might not use as many). Once this was done, we started=20
> experiencing problems with data being 'shifted' and/or corrupted=20
> throughout the applications which didn't immediately cause problems,
> but either scribbled on someone else's memory and/or bad results...
> We knew where one of the offending scribbles started (by the shifting=20
> by 1 byte of a structure) and found by comparing binaries with 'older'
> compiler vs. this one that the only major difference was the 'density'=20
> of the SPE instructions...
>
> As to your question, Kumar:=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D
> Naively, I explicitly enabled the SPE in a BSP 'early_init' program=20
> (as well as enabling Machine Checks) - which is what I meant by
> Enabling SPE...
Yeah, you don't want to do this. It'll potentially break your
application.
I'm not that familiar with the CPU you are using but I'm guessing that
you can't write the MSR from user space anyway.
> Michael explained that it is 'normal' if we asynchronously polled
> the MSR (in an application and/or in the kernel) that it might be
> disabled at the moment, but that you do a 'lazy switch' that=20
> enables it...and gets turned on when an SPE exception comes in...
>
> ...ok...I can live with that...
>
> -------where I was really going---------
>
> This is where I was trying to go. A developer at our company (who no
> longer works for us) - did some research/development on the SPE=20
> functionality, in the hopes that we could create an optimized library.
> The results were successful, but because of some of the restrictions=20
> (including 8 byte alignment for some instructions) - we decided not
> to incorporate this library into our application(s)
>
> But, this developer in his results, indicated that he believed our
> kernels were NOT properly saving/restoring the upper 32bits of the
> GPR (which can/will be used in the SPE instructions)... Thus, if the
> upper 32bits were not saved (and restored when the application got
> the SPE to operate on)...then, he thought there would be problems.
> He unfortunately, was unable to finish his work and fix these 'bugs'
> before he left our company...
>
> Again, I am only going on his results, and not my own investigations
> (I am not sure where to start to find this problem to begin with)...
>
> So, I was REALLY asking - has anybody else run into this type of
> problem, and/or the Linux community has recognized this problem and
> has fixed this?
If GPRs where getting corrupted in userspace, that would be a serious
bug and would be noticed by someone pretty quickly.
We'd really need a test case to get anywhere with this report.
Mikey
next prev parent reply other threads:[~2009-05-06 0:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 22:25 MSR_SPE - being turned off Morrison, Tom
2009-05-05 4:17 ` Michael Neuling
2009-05-05 11:07 ` Kumar Gala
2009-05-05 12:56 ` Morrison, Tom
2009-05-05 21:18 ` Kumar Gala
2009-05-06 0:07 ` Morrison, Tom
2009-05-06 0:01 ` Michael Neuling [this message]
2009-05-06 0:42 ` Morrison, Tom
2009-05-06 4:23 ` Kumar Gala
2009-05-06 8:31 ` Morrison, Tom
2009-05-06 12:31 ` Kumar Gala
2009-05-06 12:42 ` Morrison, Tom
2009-05-06 12:44 ` Kumar Gala
2009-05-06 19:33 ` Morrison, Tom
2009-05-06 20:15 ` Morrison, Tom
2009-05-06 21:23 ` Kumar Gala
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=13221.1241568099@neuling.org \
--to=mikey@neuling.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=tmorrison@empirix.com \
/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).