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

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Mon, 2 Mar 2015 16:17:03 -0800
On 2 March 2015 at 16:12, K. Macy <kmacy_at_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 definition of "very temporary holding" ? What's the
>> behavioural difference?
>
> Long enough to complete a DMA operation versus the lifetime of  an
> executing program.

Ok, but is there a specific time length that this should be?

A DMA operation to a slow device could be up to hundreds of
milliseconds; or seconds if things are really backed up.

Using wire instead of hold definitely made things work without having
the page disappear from underneath it. Oleksander knows more about the
details of that.



-adrian
Received on Mon Mar 02 2015 - 23:17:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC