From: Matt H. <mat...@us...> - 2005-10-17 22:11:26
|
On Fri, 2005-10-14 at 16:29 -0500, Jack Steiner wrote: > On Wed, Oct 12, 2005 at 04:17:56PM -0700, Matt Helsley wrote: <snip> > > Jack, > > > > OK, how about this patch? It's essentially an amalgam of the features > > of task_notifiers and task_notify based on Chandra's task_notify patch. > > > > It's also completely untested. This is just to demonstrate what I'm > > proposing. > > > > Cheers, > > -Matt Helsley > > I like the way you have integrated the global & task-based notifier lists. That > seems like the right way to go. > > > On the task-based notifiers, I noticed: > > - it looks like you support attaching/removing a notifier from an > arbitrary task (task_notify_watch_task(..., struct task_struct *)) > > - but there is no locking on the list management or walking routines > > Have we clearly established whether task_notify_watch_task() can target > other than the current task? I know that some of the "job" interfaces > use this capability of PAGG, but I don't know if it is essential. No we haven't established that -- however I think the same problem exists with your original registration functions. We could rely on callers to follow these rules or we could attempt to check them at runtime (perhaps only when debugging is configured..). I'll add the following to the documentation: - task_notify_watch_task() may only be called from process context of: - the process being watched - the process that is forking and will be the parent of the watched process And - task_notify_ignore_task() may only be called from the process context of the task being ignored. I believe these are the same constraints your original patch was operating under. Correct? While - task_notify_watch_all() and task_notify_ignore_all() may be called from any context > BTW, I leave tonight for 2 weeks vacation & will be unable to respond to > future mail during that time. Don't take lack of response for lack of interest!! OK, thanks for reviewing my patch and the vacation notice. Cheers, -Matt Helsley <matthltc @ us.ibm.com> |