Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Mar 2015 16:17:03 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        "K. Macy" <kmacy@freebsd.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: Doing zero-copy stuff in drivers, or "is vm_fault_quick_hold_pages() enough" ?
Message-ID:  <CAJ-Vmo=6QHPVz5rj_0XcCHkYyHB3qFEhTRWRTafQAJW%2BE44Wbg@mail.gmail.com>
In-Reply-To: <CAHM0Q_PsTVZgfwnY7MuE7cBxchcufpACDu2wjUc_Yvuv858Yxw@mail.gmail.com>
References:  <CAJ-Vmom87%2BC0dT5gj8YVGH-QjqDHU3otKeb9XaDSnwwzrY5hPQ@mail.gmail.com> <CAHM0Q_PnW%2BmhSU4SeAuwBJvvAx6G3fsVDNAN6Fpt1JUFn5_ysQ@mail.gmail.com> <CAJ-VmonpLG4BTmJvnzOe7HJMaZ3Z8iVzwG62xZkAtCHb=94AQA@mail.gmail.com> <CAHM0Q_PsTVZgfwnY7MuE7cBxchcufpACDu2wjUc_Yvuv858Yxw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2 March 2015 at 16:12, K. Macy <kmacy@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=6QHPVz5rj_0XcCHkYyHB3qFEhTRWRTafQAJW%2BE44Wbg>