[Cbe-oss-dev] Potential issue with spu_stop in loop

malc mlashley at gmail.com
Tue Jun 3 09:58:51 EST 2008


Running the test code against a libspe2 built with debug symbols - it
blocks on a pipe-write here:

#1  0x00000400000575a4 in _event_spe_context_run (spe=0x10014010,
entry=0xfffffd05f54, runflags=0, argp=0x0, envp=0x0,
    stopinfo=0xfffffd05f58) at spe_event.c:489
489       if (write(evctx->stop_event_pipe[1], stopinfo,
sizeof(*stopinfo)) != sizeof(*stopinfo)) {
490       /* error check. */
491       }

I have proved this to be the case, a simple 'cat /proc/<pid>/fd/7'
will allow the test-application to run to completion each time.

It tallies - since kernel 2.6.11 or so pipe size has been 64K - test
app bails at around 2720, sizeof(*stopinfo) is 24 bytes, giving us
65xxx or thereabouts.

In _event_spe_context_initialize - we make the read-side of the pipe
non-blocking, but not the write side. Given the comment about error
check above - I guess the author intended to set the write-side
likewise. I did this - and the test-app runs to completion.

I'd submit a patch - but I still can't see what's *consuming* the
stopinfo at the read-side of the pipe - breakpoint @
_event_spe_stop_info_read() doesn't get hit... and also I can't
explain why this isn't hit on the QS21 blades (as reported in the
developerworks thread)

Cheers,
malc.





On Mon, Jun 2, 2008 at 10:21 PM, Goffredo Marocchi <panajev at gmail.com> wrote:
> http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=205730&tstart=0
>
> It only seems to be a problem for PS3 and not for Cell Blades: it fails on
> the thread starter's PS3 Linux set-up as it fails on mine, but works
> flawlessly on the two Cell Blades other users tested that code on.
>
> The code is available as an attachment to the second post:
>
> http://www-128.ibm.com/developerworks/forums/servlet/JiveServlet/download/739-205730-14088270-322870/spu_stop_ex.tar.gz
>
> Could it be a PS3 Linux kernel related issue ?
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev
>



More information about the cbe-oss-dev mailing list