Roland Dreier <[email protected]> wrote: > > Roland> a) app registers 0x0000 through 0x17ff > Roland> b) app registers 0x1800 through 0x2fff > Roland> c) app unregisters 0x0000 through 0x17ff > Roland> d) the page at 0x1000 must stay pinned > > Andrew> The userspace library should be able to track the tree and > Andrew> the overlaps, etc. Things might become interesting when > Andrew> the memory is MAP_SHARED pagecache and multiple > Andrew> independent processes are involved, although I guess > Andrew> that'd work OK. > > I used to think I knew how to handle this, but in your scheme where > the kernel is doing accounting for pinned memory by marking vmas with > VM_KERNEL_LOCKED, at step c), I don't see why the kernel won't unlock > vmas covering 0x0000 through 0x1fff and credit 8K back to the > process's pinning count. > > Sorry to be so dense but can you spell out what you think should > happen at steps a), b) and c) above? Well I was vaguely proposing that the userspace library keep track of the byteranges and the underlying page states. So in the above scenario userspace would leave the page at 0x1000 registered until all registrations against that page have been undone. - 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:
- References:
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Timur Tabi <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Libor Michalek <[email protected]>
- Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Prev by Date: DRI lockup on R200, 2.6.11.7
- Next by Date: Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Previous by thread: Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Next by thread: Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Index(es):