Date: Thu, 22 Mar 2012 19:57:11 +0000 From: Eric Saint-Etienne <eric.saintetienne@gmail.com> To: Ryan Stone <rysto32@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: malloc pages map to user space Message-ID: <CACJX%2B511wZyKVXeYqUQ3v6Uh0ZN83TbBZT7CC6V6N0jTsibD-w@mail.gmail.com> In-Reply-To: <CAFMmRNxvLz9G73Kn2BXq9WG5-0ZcTN%2BSumawWDzz5DRj=hN4PQ@mail.gmail.com> References: <CACJX%2B52DPPYea5k6QxQ6WQ62GEA9YHGr4y=ETUpPArNL83kh5w@mail.gmail.com> <CACJX%2B535YeOwWZodE1w8jiECKbDgyBbZgYDd=M31NwyTMTx83g@mail.gmail.com> <CACJX%2B51Po_RfhUF7Ba1VT0XLfLWQYWFmnRBRcNuDp%2B3nh_AopQ@mail.gmail.com> <CAFMmRNxvLz9G73Kn2BXq9WG5-0ZcTN%2BSumawWDzz5DRj=hN4PQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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. =C2=A0Your 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. So I'd like to do it the "hard" way which I feel is the most optimized. Thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACJX%2B511wZyKVXeYqUQ3v6Uh0ZN83TbBZT7CC6V6N0jTsibD-w>