[OpenAFS] OpenAFS on Linux 2.5.x
Srikanth Vishwanathan
vsrikanth@in.ibm.com
Thu, 17 Apr 2003 14:01:55 -0400
This is a multipart message in MIME format.
--=_alternative 0062DC8085256D0B_=
Content-Type: text/plain; charset="US-ASCII"
FYI, AIX 5.1 introduced these kernel interfaces. Something similar
would be helpful.
/usr/include/sys/cred.h ->
int kcred_getpag (struct ucred *, int, int *);
int kcred_setpag (struct ucred *, int, int);
/* which parameter values */
#define PAG_DFS 0
#define PAG_AFS 1
/* Works on the current process */
int get_pag(int which, int *pag);
int set_pag(int which, int pag);
struct pag_list {
int pag;
int active;
int spare[2];
};
/* Given a pag, checks if there is any process that is using the PAG */
/* Useful for garbage collection of user structures */
int validate_pag(int which, struct pag_list pag[], int npag);
Thanks,
openafs-info-admin@openafs.org wrote on 04/17/2003 01:12:43 PM:
> On 17 Apr 2003, Derek Atkins wrote:
>
> > Jeffrey Hutzelman <jhutz@cmu.edu> writes:
> >
> > > To reiterate... Don't conflate PAG's with process groups; they do
> > > different things and need different scoping rules. Though some may
have
> > > forgotten, we've learned that lesson already -- it's why there's now
a
> > > distinction between process groups and sessions.
> > >
> > > PAG scoping is completely orthogonal to sessions. Many PAGs contain
> > > multiple sessions, due to things like running multiple xterms each
of
> > > which contains a session leader (as described above). But
conversely, I
> > > frequently have xterms which run processes in different PAG's, since
I
> > > routinely establish new PAG's to do privileged operations.
> >
> > Clearly we just need to write a patch that adds a pag_t type to struct
> > task, copied at fork(), and supplies a pag_create(task_t *) API to
> > create a new PAG in the given task. I think that would be sufficient.
> > I don't think it would be a lot of code. Is there some other API(s)
> > that we could need (assuming we could just use task->pag to read the
> > PAG out of a task).
> >
> > I'd also recommend "typedef __u64 pag_t;", but we could use an "__u32"
> > if we wanted.
> >
> > Comments? Anyone care to write the (small) patch? I'm willing to
present
> > it to Linus, Alan, et al.
>
> Not just an API. If the OS is going to provide a PAG mechanism, it
should
> also provide the relevant syscalls. That way everyone can use the same
> PAG mechanism, and maybe someday the standard tools will do PAG
> management.
>
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
--=_alternative 0062DC8085256D0B_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2><tt>FYI, AIX 5.1 introduced these kernel interfaces. Something
similar</tt></font>
<br><font size=2><tt>would be helpful.</tt></font>
<br>
<br><font size=2><tt>/usr/include/sys/cred.h -></tt></font>
<br>
<br><font size=2><tt>int kcred_getpag (struct ucred *, int, int *);</tt></font>
<br><font size=2><tt>int kcred_setpag (struct ucred *, int, int);</tt></font>
<br>
<br><font size=2><tt>/* which parameter values */</tt></font>
<br><font size=2><tt>#define PAG_DFS 0</tt></font>
<br><font size=2><tt>#define PAG_AFS 1</tt></font>
<br>
<br><font size=2><tt>/* Works on the current process */</tt></font>
<br><font size=2><tt>int get_pag(int which, int *pag);</tt></font>
<br><font size=2><tt>int set_pag(int which, int pag);</tt></font>
<br>
<br><font size=2><tt>struct pag_list {</tt></font>
<br><font size=2><tt> int pag;</tt></font>
<br><font size=2><tt> int active;</tt></font>
<br><font size=2><tt> int spare[2];</tt></font>
<br><font size=2><tt>};</tt></font>
<br>
<br><font size=2><tt>/* Given a pag, checks if there is any process that
is using the PAG */</tt></font>
<br><font size=2><tt>/* Useful for garbage collection of user structures
*/</tt></font>
<br>
<br><font size=2><tt>int validate_pag(int which, struct pag_list pag[],
int npag);</tt></font>
<br>
<br><font size=2><tt>Thanks,</tt></font>
<br>
<br><font size=2><tt>openafs-info-admin@openafs.org wrote on 04/17/2003
01:12:43 PM:<br>
<br>
> On 17 Apr 2003, Derek Atkins wrote:<br>
> <br>
> > Jeffrey Hutzelman <jhutz@cmu.edu> writes:<br>
> ><br>
> > > To reiterate... Don't conflate PAG's with process
groups; they do<br>
> > > different things and need different scoping rules. Though
some may have<br>
> > > forgotten, we've learned that lesson already -- it's why
there's now a<br>
> > > distinction between process groups and sessions.<br>
> > ><br>
> > > PAG scoping is completely orthogonal to sessions. Many
PAGs contain<br>
> > > multiple sessions, due to things like running multiple xterms
each of<br>
> > > which contains a session leader (as described above). But
conversely, I<br>
> > > frequently have xterms which run processes in different
PAG's, since I<br>
> > > routinely establish new PAG's to do privileged operations.<br>
> ><br>
> > Clearly we just need to write a patch that adds a pag_t type
to struct<br>
> > task, copied at fork(), and supplies a pag_create(task_t *) API
to<br>
> > create a new PAG in the given task. I think that would
be sufficient.<br>
> > I don't think it would be a lot of code. Is there some
other API(s)<br>
> > that we could need (assuming we could just use task->pag to
read the<br>
> > PAG out of a task).<br>
> ><br>
> > I'd also recommend "typedef __u64 pag_t;", but we could
use an "__u32"<br>
> > if we wanted.<br>
> ><br>
> > Comments? Anyone care to write the (small) patch? I'm
willing to present<br>
> > it to Linus, Alan, et al.<br>
> <br>
> Not just an API. If the OS is going to provide a PAG mechanism,
it should<br>
> also provide the relevant syscalls. That way everyone can use
the same<br>
> PAG mechanism, and maybe someday the standard tools will do PAG<br>
> management.<br>
> <br>
> _______________________________________________<br>
> OpenAFS-info mailing list<br>
> OpenAFS-info@openafs.org<br>
> https://lists.openafs.org/mailman/listinfo/openafs-info<br>
</tt></font>
--=_alternative 0062DC8085256D0B_=--