On Fri, 2006-08-04 at 16:30 -0700, Paul Menage wrote:
> On 8/4/06, Andrew Morton <[EMAIL PROTECTED]> wrote:
> >
> > Because directories are created by mkdir(), not by open()+write().
> >
> 
> That's not always true, particularly for kernel-virtual things like this.
> 
> /proc/<pid> directories are created with fork() and removed with waitpid()

In this model mkdir is impossible to use.

> Various other things in /proc are created via modprove and removed via rmmod

Userspace isn't "creating" a module. It's asking the kernel to load a
pre-existing module. So mkdir is nonintuitive. The fact that a directory
appears for the module in /sys is a side-effect -- it is not the primary
purpose of modprobe to create this directory and its contents.

> The point is that we're not actually creating a directory, we're
> creating a resource group, whose userspace API is made through the
> directory abstraction. So maybe it's not so bad if we don't actually
> use mkdir to create it.

        Unlike your fork() example it *is* possible to implement resource group
creation with mkdir(). Unlike your module loading example userspace is
actually creating something. mkdir is usable and intuitive for resource
group creation.

Cheers,
        -Matt Helsley



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to