login
Header Space

 
 

Re: [Cbe-oss-dev] [PATCH] Cell OProfile: SPU mutex lock fix

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <cbe-oss-dev@...>
Cc: Carl Love <cel@...>, <linuxppc-dev@...>, <linux-kernel@...>, cel <cel@...>
Date: Wednesday, April 2, 2008 - 1:21 am

On Tuesday 25 March 2008, Carl Love wrote:

So what was the exact bug you're fixing with this? There was no
buffer_mutex before, so why do you need it now? Can't this be a
spinlock so you can get it from interrupt context instead of
using a workqueue?


Please keep #include statements in alphabetical order, with all linux/ files
before the asm/ files.


Never put extern statements in the implementation, they describe the
interface between two parts of the code and should be inside of a
common header.

Why do you want to have your own workqueue instead of using the
global one?


This looks like you want to use a delayed_work rather than building your
own out of hrtimer and work. Is there any point why you want to use
an hrtimer?


Again, public interfaces need to go to a header file, and should
have a name that identifies the interface. "buffer_mutex" is
certainly not a suitable name for a kernel-wide global variable!


I don't understand what these variables are really doing, but
having e.g. just one spu_context_switch_data for all the SPUs
doesn't seem to make much sense. What happens when two SPUs do
a context switch at the same time?


Something is very wrong if you need so many global variables!


While you're cleaning this up, I guess the cached_info should
be moved into a pointer from struct spu as well, instead of
having this global variable here.


I would guess that you need one work struct per SPU instead of a global
one, if you want to pass the SPU pointer as an argument.

	Arnd <><
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [Cbe-oss-dev] [PATCH] Cell OProfile: SPU mutex lock fix, Arnd Bergmann, (Wed Apr 2, 1:21 am)
speck-geostationary