[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: malloc pages map to user space
From: John Baldwin <jhb () freebsd ! org>
Date: 2012-03-22 21:13:35
Message-ID: 201203221713.35202.jhb () freebsd ! org
[Download RAW message or body]
On Thursday, March 22, 2012 3:57:11 pm Eric Saint-Etienne wrote:
> > If your kernel module creates a device in /dev that implements the
> > mmap method, then you don't need to worry about mucking around with
> > vm_maps and objects and whatnot. Your mmap method just needs to be
> > able to convert offsets into the device into physical memory
> > addresses,
>
> Yes I'm aware of this facility, thank you.
>
> > and the vm infrastructure will do the rest for you.
>
> Since this mapping is on the main path of the driver, I'm worried that
> the overhead on each access of a page fault and a function call (the
> pager associated with a cdev mmap) is too much to bear.
It only does this on the first page fault though, not every access to the
page. This can be a bit of a downfall as well as you can't easily
invalidate a mapping once you've established it.
--
John Baldwin
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic