I've posted another 2.6.10 PAGG patch on OSS.
It's named linux-2.6.10-pagg.patch-2
This one implements some of the changes Kingsley Cheung requested.
See BugZilla #382:
http://oss.sgi.com/bugzilla/show_bug.cgi?id=382
One request we didn't act on was moving pagg_attach in copy_process
to be near the bottom of the function. The last PAGG patch I sent out
fixed a bug where the exit status of pagg_attach wasn't being handled
within copy_process. As of yesterday, if pagg_attach fails, it will cause
the fork to fail. This seems "right" to me. However, if we move it to
the bottom of copy_process like requested, there isn't a good way to fail
the fork because the task is too far along in its life and is probably
too known to the system by then. Even if this weren't true, we'd need to
add a new fork_cleanup section which is a bit invasive.
If we hadn't changed the call to pagg_attach in copy_process to handle
pagg_attach errors yesterday, it probably would have worked fine to move
pagg_attach as requested.
I'm open to suggestions on this. I'm going to send this patch to LKML
along with Limin who is posting a new JOB patch soon. If we don't have any
ideas on how to handle this here, we could try a broader audience.
The current location of pagg_attach is right after sched_fork(p) in
copy_process. The location requested is right above fork_out:
Thank you.
On Thu, 6 Jan 2005, Erik Jacobson wrote:
> Hi there.
>
> I just uploaded a new PAGG patch for 2.6.10. It includes a request to
> slightly change how the attach function pointer of the PAGG hook is
> managed.
>
> Note that we may be posting another PAGG patch soon with some other
> changes.
>
> We now make it so the PAGG user can decide if a new process will actually
> be grouped or not by looking at the attach function pointer return
> value.
>
> The attach function, pointed to by the PAGG hook and run by pagg_attach,
> can have these return values:
>
> <0 Error which is propagated back to copy_process so
> the fork fails.
>
> =0 success, attach to same container as parent
>
> >0 success, but don't attach to a container
>
> It's also important to note that, as of now, if a negative value is
> returned by the attach function pointer, the value will be passed up
> through copy_process as a fork failure.
>
>
> Find the 'linux-2.6.10-pagg.patch' patch at the PAGG web site.
> http://oss.sgi.com/projects/pagg/
> Click on "Download" on the left.
>
> Thank you.
>
> --
> Erik Jacobson - Linux System Software - Silicon Graphics - Eagan, Minnesota
>
--
Erik Jacobson - Linux System Software - Silicon Graphics - Eagan, Minnesota
|