On Fri, 8 Jun 2007, Alan Cox wrote: > > So, what do you plan to do? Those handle won't be zero-based. Your > > "working" system I immagine will do: > > > > bleeh[handle - BASE].duh = ...; > > > > How nice for a working system. If you *store* the handle returned by the > > OS, and you *use* the handle to call for OS services, you will be fine > > independently from the value handed out by the OS. > > Well there are two ways I'd do this > > #1: Throw the whole thing away and accept its not a good idea anyway Unfortunately (exactly because of the same guarantees you're asking for those handles), in order for userspace libraries to reliably internally use fds to interact with the kernel, you need another kind of allocation strategy. > #2: If I was really going this way and I wanted to use it for serious > tricks for high performance I/O then I'd provide the handle from > userspace so that the strategy for allocation is controlled by the caller > who is the only one who can make the smart decisions It does not work. What if the main application, library A and library B wants to implement their own allocation strategy? - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- References:
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Kyle Moffett <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Eric Dumazet <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Eric Dumazet <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Theodore Tso <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Prev by Date: Re: [patch 00/12] Slab defragmentation V3
- Next by Date: [patch] CFS scheduler, -v16
- Previous by thread: Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Next by thread: Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Index(es):