Re: [PATCH RFC 1/5] vringfd syscall
From: Rusty Russell
Date: Sat Apr 12 2008 - 14:20:21 EST
On Sunday 13 April 2008 03:18:20 Marcelo Tosatti wrote:
> I suppose you are doing data copy in ->poll instead of ->read to save
> a system call? This is weird, not conformant to what the interface is
> supposed to do.
Hi Marcelo,
Thanks for reading this.
Yeah, I dislike it too. The main motivation was that not all rings need to
be "pulled" in this way, but it turns out that userspace can detect this
(poll, check ring, if nothing, try read, check ring). So next version will
unscrew the poll callback.
> > + /* If they want to use atomically, we have to map the page. */
> > + if (atomic_use) {
> > + if (get_user_pages(current, current->mm,
> > + (unsigned long)vr->ring.used, 1, 1, 1,
> > + &vr->used_page, NULL) != 1) {
>
> Can't the same be achieved by the app mlocking the vring pages, which
> then goes through standard rlimit checking ?
Tun/tap writes to this from any context. Fortunately, this too is changing,
as I came up with a sane way of queueing to userspace context for this case.
Expect updated patches Monday.
Thanks!
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/