Re: [Linux-cluster] Re: GFS, what's remaining

From: Andrew Morton (akpm_at_osdl.org)
Date: 09/04/05

  • Next message: Willy Tarreau: "Re: forbid to strace a program"
    Date:	Sun, 4 Sep 2005 01:37:04 -0700
    To: Mark Fasheh <mark.fasheh@oracle.com>
    
    

    Mark Fasheh <mark.fasheh@oracle.com> wrote:
    >
    > On Sun, Sep 04, 2005 at 12:23:43AM -0700, Andrew Morton wrote:
    > > > What would be an acceptable replacement? I admit that O_NONBLOCK -> trylock
    > > > is a bit unfortunate, but really it just needs a bit to express that -
    > > > nobody over here cares what it's called.
    > >
    > > The whole idea of reinterpreting file operations to mean something utterly
    > > different just seems inappropriate to me.
    > Putting aside trylock for a minute, I'm not sure how utterly different the
    > operations are. You create a lock resource by creating a file named after
    > it. You get a lock (fd) at read or write level on the resource by calling
    > open(2) with the appropriate mode (O_RDONLY, O_WRONLY/O_RDWR).
    > Now that we've got an fd, lock value blocks are naturally represented as
    > file data which can be read(2) or written(2).
    > Close(2) drops the lock.
    >
    > A really trivial usage example from shell:
    >
    > node1$ echo "hello world" > mylock
    > node2$ cat mylock
    > hello world
    >
    > I could always give a more useful one after I get some sleep :)

    It isn't extensible though. One couldn't retain this approach while adding
    (random cfs ignorance exposure) upgrade-read, downgrade-write,
    query-for-various-runtime-stats, priority modification, whatever.

    > > You get a lot of goodies when using a filesystem - the ability for
    > > unrelated processes to look things up, resource release on exit(), etc. If
    > > those features are valuable in the ocfs2 context then fine.
    > Right, they certainly are and I think Joel, in another e-mail on this
    > thread, explained well the advantages of using a filesystem.
    >
    > > But I'd have thought that it would be saner and more extensible to add new
    > > syscalls (perhaps taking fd's) rather than overloading the open() mode in
    > > this manner.
    > The idea behind dlmfs was to very simply export a small set of cluster dlm
    > operations to userspace. Given that goal, I felt that a whole set of system
    > calls would have been overkill. That said, I think perhaps I should clarify
    > that I don't intend dlmfs to become _the_ userspace dlm api, just a simple
    > and (imho) intuitive one which could be trivially accessed from any software
    > which just knows how to read and write files.

    Well, as I say. Making it a filesystem is superficially attractive, but
    once you've build a super-dooper enterprise-grade infrastructure on top of
    it all, nobody's going to touch the fs interface by hand and you end up
    wondering why it's there, adding baggage.

    Not that I'm questioning the fs interface! It has useful permission
    management, monitoring and resource releasing characteristics. I'm
    questioning the open() tricks. I guess from Joel's tiny description, the
    filesystem's interpretation of mknod and mkdir look sensible enough.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Willy Tarreau: "Re: forbid to strace a program"

    Relevant Pages

    • Re: threading - Monitor.Wait/Pulse
      ... don't get with WaitHandles is that it releases the Lock on the Object you ... You would probably also need to use either a WaitHandle, ... End SyncLock ... will thread 3 then get the resource or will thread 1 ...
      (microsoft.public.dotnet.general)
    • Re: threading - Monitor.Wait/Pulse
      ... iteration (before the first SyncLock on those threads), ... on another lock request from thread 2 or 3. ... The WaitHandle, I'am guessing, seems to ... will thread 3 then get the resource or will thread 1 ...
      (microsoft.public.dotnet.general)
    • Re: threading - Monitor.Wait/Pulse
      ... and releases the lock on the monitored object. ... a thread calls Pulseon the Monitor, the first thread in the Wait Queue ... will thread 3 then get the resource or will thread 1 get ... When Thread1 calls Wait on the monitor object, ...
      (microsoft.public.dotnet.general)
    • Re: [Linux-cluster] Re: GFS, whats remaining
      ... You get a lock at read or write level on the resource by calling ... that I don't intend dlmfs to become _the_ userspace dlm api, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RFC for a new Scheduling policy/class in the Linux-kernel
      ... block graph G_i, which consists of n nodes and would be m deep. ... because otherwise we can end up wanting to execute the resource ... blocked on some lock that have been left on the rq to proxy-execute the ... order to avoid wasting CPU time too much... ...
      (Linux-Kernel)