All of lore.kernel.org
 help / color / mirror / Atom feed
* Some ideas on how to mix userspace fifo's with a kernel memory manager
@ 2008-12-20 12:58 Maarten Maathuis
       [not found] ` <fc5b84ad0812201308r5fab4534j93ebe66b7b486319@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Maarten Maathuis @ 2008-12-20 12:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

I was thinking of the following system:

Allocate a fifo for userspace, map the fifo, map the fifo registers into 
userspace.
These allocations are therefore pinned, so something to avoid memory 
fragmentation has to be done.

Userspace library fills up an entire fifo, minus a few essential things 
i will mention later. Userspace does ioctl with all the bo's it'll need 
for the fifo. Kernel pins all these bo's, creates several dma objects 
that covers only a single bo (as a form of memory protection). Kernel 
sends back a list of these object handles + a list of ref_cnt values 
that have to inserted after the bo usage is done. Userspace fills in the 
remaining values and fires the fifo.

Later, under memory pressure for example, the memory manager checks 
which bo's can be unpinned.

So you'll still need an ioctl, but you do avoid a copy into kernel 
space, which might hurt for stuff like hostdata transfers.

As usual, comment is appreciated.

Maarten.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-21  0:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 12:58 Some ideas on how to mix userspace fifo's with a kernel memory manager Maarten Maathuis
     [not found] ` <fc5b84ad0812201308r5fab4534j93ebe66b7b486319@mail.gmail.com>
     [not found]   ` <fc5b84ad0812201308r5fab4534j93ebe66b7b486319-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-20 22:48     ` Maarten Maathuis
     [not found]       ` <494D7651.9050005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-12-21  0:51         ` Maarten Maathuis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.