Date: Wed, 4 May 2016 18:34:38 +0530 From: kumara rathnavel <kumara.bsd@gmail.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-drivers@freebsd.org Subject: Re: Device Pager Message-ID: <CA%2BNzLaO5h0TVDFuQq9iJywC%2BTgn3HOzE0hUZYn=PjX8y01CMrg@mail.gmail.com> In-Reply-To: <20160504112255.GB2422@kib.kiev.ua> References: <CA%2BNzLaNuqf3=i_Yq9f%2BY3zMXSbwYHe_JzN7Uf-t==GyEG-jwPQ@mail.gmail.com> <20160504112255.GB2422@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the reply. I have mapped it in kernel space. How do I invalidate the kernel vm_page. I have tried removing the vm_page_remove also. But I still am not getting it invalidated. On Wed, May 04, 2016 at 07:51:55AM +0530, kumara rathnavel wrote: > Hello All, > > I have written a character device pager. I have associated an object with > my device and I have mapped it to the kernel and I also have a virtual > address for it. So whenever the address is accessed first time I get a page > fault and i give the physical address to be associated in the fault > routine. Now how do I again get a page fault for the same virtual address. > I need to change the physical address periodically for a virtual address. This cannot be done with the device_pager, i.e. OBJT_DEVICE. VM system does not track mappings of the page into userspace processes, so it cannot invalidate existing mappings. What can be used for this purpose is OBJT_MGTDEVICE, which operates on managed fictitious pages. Such pages do track userspace mappings with the usual PV-lists mechanisms, so pmap_remove_all() works. This kind of pager is used by GEM and TTM. There is not much useful documentation about OBJT_MGTDEVICE, read the source to see how it is plumbed.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BNzLaO5h0TVDFuQq9iJywC%2BTgn3HOzE0hUZYn=PjX8y01CMrg>