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

Adrian Chadd adrian at freebsd.org
Tue Mar 3 00:17:04 UTC 2015


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


More information about the freebsd-current mailing list