Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Oct 2023 13:51:22 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Marcin Cieslak <saper@saper.info>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: d_map_single - how should it work?
Message-ID:  <ZTjzKk7VQRfqTJ-d@kib.kiev.ua>
In-Reply-To: <3639798o-57qp-8r14-n250-57520ssps48o@fncre.vasb>
References:  <3639798o-57qp-8r14-n250-57520ssps48o@fncre.vasb>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 25, 2023 at 07:58:41AM +0000, Marcin Cieslak wrote:
> Hello,
> 
> is there any documentation for cdevsw methods?
> I am interested in knowing how d_map_single should
> be written.
> 
> Most specifically, I want to know if the driver
> has a chance to track mmaped allocations on its own
> (as far as I can see there unmap(2) does not call
> any of the driver's methods).

You need d_map_single + managed cdev pager to get something like that.
You cannot get unmaps reported, only last reference drop is communicated.
See struct cdev_pager_ops for an idea what is provided.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZTjzKk7VQRfqTJ-d>