Date: Mon, 2 Mar 2015 15:49:56 -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-VmonpLG4BTmJvnzOe7HJMaZ3Z8iVzwG62xZkAtCHb=94AQA@mail.gmail.com> In-Reply-To: <CAHM0Q_PnW%2BmhSU4SeAuwBJvvAx6G3fsVDNAN6Fpt1JUFn5_ysQ@mail.gmail.com> References: <CAJ-Vmom87%2BC0dT5gj8YVGH-QjqDHU3otKeb9XaDSnwwzrY5hPQ@mail.gmail.com> <CAHM0Q_PnW%2BmhSU4SeAuwBJvvAx6G3fsVDNAN6Fpt1JUFn5_ysQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 March 2015 at 15:05, K. Macy <kmacy@freebsd.org> wrote: > On Mon, Mar 2, 2015 at 12:42 PM, Adrian Chadd <adrian@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. >> >> It turns out that doing vm_fault_quick_hold_pages() wasn't enough - >> the pages weren't being wired, and they may disappear before the >> hardware gets to them. > > > Then your code is buggy or you've hit a bug in the VM. Holding a page > is a short-term wiring. Well, you can look at what's going on in the vchiq code. gonzo made it an explicit wire in order to avoid issues. > 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? -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonpLG4BTmJvnzOe7HJMaZ3Z8iVzwG62xZkAtCHb=94AQA>