Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread K. Macy
On Mon, Mar 2, 2015 at 12:42 PM, Adrian Chadd adr...@freebsd.org wrote: Hi, gonzo@ committed a fix (r278615) to the videocore driver for the raspberry pi. The fix involved doing an explicit wire of pages that were about to be passed down to the hardware to send to the videobuffer hardware.

Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread K. Macy
Right above vm_page_hold(): /* * Keep page from being freed by the page daemon * much of the same effect as wiring, except much lower * overhead and should be used only for *very* temporary * holding (wiring). */ What's the definition of very temporary holding ? What's the

Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread Adrian Chadd
On 2 March 2015 at 16:12, K. Macy km...@freebsd.org wrote: Right above vm_page_hold(): /* * Keep page from being freed by the page daemon * much of the same effect as wiring, except much lower * overhead and should be used only for *very* temporary * holding (wiring). */ What's the

Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread Konstantin Belousov
On Mon, Mar 02, 2015 at 04:17:03PM -0800, Adrian Chadd wrote: On 2 March 2015 at 16:12, K. Macy km...@freebsd.org wrote: Right above vm_page_hold(): /* * Keep page from being freed by the page daemon * much of the same effect as wiring, except much lower * overhead and should be used

Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread Adrian Chadd
On 2 March 2015 at 16:25, Konstantin Belousov kostik...@gmail.com wrote: Ok, but is there a specific time length that this should be? Difference between hold and wire is effectively that held pages are still kept on the page queues, providing potentially uneccessary work for pagedaemon to

Re: Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread Adrian Chadd
On 2 March 2015 at 15:05, K. Macy km...@freebsd.org wrote: On Mon, Mar 2, 2015 at 12:42 PM, Adrian Chadd adr...@freebsd.org wrote: Hi, gonzo@ committed a fix (r278615) to the videocore driver for the raspberry pi. The fix involved doing an explicit wire of pages that were about to be passed

Doing zero-copy stuff in drivers, or is vm_fault_quick_hold_pages() enough ?

2015-03-02 Thread Adrian Chadd
Hi, gonzo@ committed a fix (r278615) to the videocore driver for the raspberry pi. The fix involved doing an explicit wire of pages that were about to be passed down to the hardware to send to the videobuffer hardware. It turns out that doing vm_fault_quick_hold_pages() wasn't enough - the pages