[lkml]   [2002]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Futex Asynchronous Interface

    On Fri, 7 Jun 2002, Rusty Russell wrote:
    > Linus, Al, is there an easier way to do this? I stole this from sockfs,
    > but I balked at another 50 lines for a proper inode creation, so I just use
    > the same dentry and inode over and over.

    There's nothing inherently wrong with re-using the inode and dentry -
    that's what /dev/futex would do too, of course.

    > It's still an awful lot of irrelevant code: what can I cut?

    I don't think it's a matter of cutting, as much as possibly a matter of
    tryign to share some common code. pipefs, sockfs and now this: they all do
    pretty much exactly the same thing, and there is nothing that says that
    they should have separate super_operations, for example, since they are
    all identical.

    And once you have the same super_operations, you really have the same
    "fill_super" functions too. The only thing that separates these
    superblocks is the root name, so that /proc gets nice output. So it should
    be fine to just have

    sb = create_anon_fs("futex");

    and share all of the setup code across futex/pipes/sockfs.

    Which still leaves you with the

    filp->f_dentry = dget(sb->s_root);
    .. fill it ..
    fd_install(fd, filp);

    but by then we're talking single lines of overhead.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:26    [W:0.022 / U:13.800 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site