pagg
[Top] [All Lists]

Re: PAGG ideas for next attempt: new docs, new name?

To: Paul Jackson <pj@xxxxxxx>
Subject: Re: PAGG ideas for next attempt: new docs, new name?
From: Erik Jacobson <erikj@xxxxxxx>
Date: Mon, 19 Sep 2005 10:05:30 -0500
Cc: Erik Jacobson <erikj@xxxxxxx>, pagg@xxxxxxxxxxx
In-reply-to: <20050919023620.38ec1820.pj@sgi.com>
References: <20050917153409.GA17708@sgi.com> <20050919023620.38ec1820.pj@sgi.com>
Sender: pagg-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
> When does this init event occur - at the beginning of something,
> I presume.  I'm just not clear of what.

Ok, I added "at the time of registration":
...
Finally, there is an init event.  This special
event makes it so this kernel module will be associated with all current
processes in the system at the time of registration.  This is used when a
kernel module wants to keep track of all current processes as opposed to just
those it associates by itself (and children that follow).



> > fork event is a spot in copy_process when a parent forks.
> 
> So this event is in the parent, not the child?  That seems
> slightly odd.

The module gets notified when the parent forks and the child is being
created.  The child receives the same allocation list that the parent
had but the kernel module has some control here based on return
value to decide if the new process should really be associated with
the kernel module or not.

> >     int rc = pn_register(&pn_service_request);
> >     if (rc < 0) {
> >             return -1;
> >     }
> 
> Should that "return -1" be a "return -ERRNO" for some error number?

I'm not sure; we certainly haven't been doing that so far. 

> > unrelated processes together to be tracked and signaled as ia set
> Is that "ia" a typo?

Yes :)


> >     /* We have a valid task now */
> >     get_task_struct(task); /* Ensure the task doesn't vanish on us */
> >     read_unlock(&tasklist_lock); /* Unlock the tasklist */
> >     ...
> What is the piece of code, beginning with these three lines, doing?

I'll try to come up with a better generic example.  It's supposed to show
how to use the data pointer because the over-simple examples for
using pnotify earlier in the doc aren't sophisticated enough to show that.

Erik

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