Date: Mon, 2 Mar 2015 16:37:13 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-current <freebsd-current@freebsd.org>, "K. Macy" <kmacy@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-Vmonnv6bWOk51kEXaXb1ww6yy=wWJKonG_joo-bUFx3sS5Q@mail.gmail.com> In-Reply-To: <20150303002536.GE2379@kib.kiev.ua> 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> <CAJ-Vmo=6QHPVz5rj_0XcCHkYyHB3qFEhTRWRTafQAJW%2BE44Wbg@mail.gmail.com> <20150303002536.GE2379@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 March 2015 at 16:25, Konstantin Belousov <kostikbel@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 find them and skip. Wired pages are removed from the > queues. > > This means that holding a page is much cheaper, by the cost of leaving > slightly more work to the system. Also, holding a page only requires the > page lock, while wiring contend on the page queue lock, in addition to > the page lock. Thanks for the description - that makes things a lot clearer! >> >> 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. > > Page cannot 'disappear'. The only thing which could happen with the > memory page is reuse, when the page is removed from the previous object > and re-purposed for some other object, loosing old content. > > Your terminology suggests that something unrelated happen. Yup, and that's what I'm worried about :( -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmonnv6bWOk51kEXaXb1ww6yy=wWJKonG_joo-bUFx3sS5Q>