Re: New PAGG patch for 2.6.10, new functionality
Erik Jacobson <[email protected]>
| Newsgroups | gmane.linux.process-aggregates |
|---|---|
| Message-ID | <[email protected]> |
Just to make sure I understand -- You'd use this in case you want to be notified about each task but you don't necessarily want paggs allocated for each task as you have no desire to group them. Is that right? If so, I just didn't think of that use. I thought people who wanted the init function would also want pagg associations. Could a person who wants notification of all processes use something like for_each_process/for_each_task instead? So is the reason you suggest this just to be consistent like you said in your note? Or is there a use you had in mind that I didn't think of? One thing I'd say is that it isn't possible to be fully consistent with attach anyway. If the init function pointer fails, it isn't like we can propegate the error to fork like we do in attach. And I doubt we'd want to kill the running task :) Let me know your thoughts on this... On Tue, 11 Jan 2005, Kingsley Cheung wrote: > On Thu, Jan 06, 2005 at 03:50:30PM -0600, 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. > > Eric, > > One thought has come to mind. Was there a reason why similar > semantics weren't applied to pagg_init? I would have thought it would > make things consistent with pagg_attach. With error returns like: > > <0 Error which is propagated back to copy_process so > the registration function fails completely. > > =0 success, attach to same container as parent > > >0 success, but don't attach to a container > > That way processes can be ignored by pagg_init just as they can be by > pagg_attach. > > Thanks, > -- > Kingsley > -- Erik Jacobson - Linux System Software - Silicon Graphics - Eagan, Minnesota