pagg
[Top] [All Lists]

Re: [patch] Minor PAGG attach/detach semantic change for 2.6.11

To: kingsley@xxxxxxxxxx
Subject: Re: [patch] Minor PAGG attach/detach semantic change for 2.6.11
From: Erik Jacobson <erikj@xxxxxxx>
Date: Thu, 29 Sep 2005 10:12:06 -0500
Cc: Erik Jacobson <erikj@xxxxxxx>, pagg@xxxxxxxxxxx, tonyt@xxxxxxxxxx
In-reply-to: <20050929051627.GC3404@xxxxxxxxxx>
References: <20050617014512.GA10285@xxxxxxxxxx> <20050927201020.GA30433@xxxxxxx> <20050929051627.GC3404@xxxxxxxxxx>
Sender: pagg-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
> __pnotify_exit() would need to call the exit callback for all clients
> except for the client failing the fork call.  To do this wouldn't the
> following be needed in __pnotify_fork()?

If the fork fails in copy_process, we go to cleanup in copy_process, 
not exit.c.  So, with the revision, if the the pnotify kernel module
subscriber returns a failure for the process, that failure is passed 
along to the copy_process call.  There, we go to bad_fork_cleanup_namespace
where a pnotify_exit is done on the process that failed to fork.

In the old version, the pnotify_exit would have also been run within
__pnotify_fork.  In the new version, we don't run the pnotify_exit
from __pnotify_fork because we know it will be run in the fork failure
path of copy_process.  That should mean that pnotify_exit will only
execute once.  I think that means that your suggestion for adding 
a pnotify_unsubscribe isn't necessary?  The unsubscribe is done by
__pnotify_exit in this case.  Or am I still missing the point here?
Sorry if it isn't getting through my head.

See the RCU test version of pnotify in the download site under
pnotify-test.  My attempts at posting that patch to the list seem to be
eaten by the list server right now.  When that's fixed, I'll start posting
stuff here.

Erik

<Prev in Thread] Current Thread [Next in Thread>