[ewg] Re: RFC: SRC API
Michael S. Tsirkin
mst at dev.mellanox.co.il
Sat Aug 4 10:20:28 PDT 2007
> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: RFC: SRC API
>
> > - manage SRC domains
>
> OK, I guess, but why do we need so many functions to create, share,
> get shared, put SRC domains?
>
> How about just two functions:
>
> struct ibv_src_domain *ibv_open_src_domain(struct ibv_context *context,
> int fd, int oflag);
>
> where oflag is 0 or some combination of O_CREAT and O_EXCL, and:
>
> int ibv_close_src_domain(struct ibv_src_domain);
>
>
> Is there some case where explicitly unsharing an SRC domain is useful
> that can't be dealt with just by unlinking whatever file was used to
> create it? Other processes might be left with open file descriptors
> pointing to that file, but they could have already gotten the src
> domain anyway.
OK.
> > - I envision implementing this sharing mechanism in kernel by means
> > of a per-device tree, with inode as a key and domain object
> > as a value.
>
> Is the inode or the file descriptor the key? Earlier you wrote
>
> > 1:1 association between an SRC domain and a file.
>
> so there's some ambiguity.
The inode.
> Also, what's the lifetime of SRC domains? Are they implicitly
> destroyed when all processes with a reference exit?
Yes, that's the idea.
--
MST
More information about the ewg
mailing list