Subject: Re: getting rid of uvn_attach()
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 07/17/2007 23:01:26
On Tue Jul 17 2007 at 15:56:14 -0400, Thor Lancelot Simon wrote:
> On Tue, Jul 17, 2007 at 09:45:30PM +0300, Antti Kantee wrote:
> >
> > The device pager is used for character devices, not the vnode pager.
> > This is controlled in uvm_mmap().  I don't think VOP_MMAP() on a char
> > device makes any sense at all, so if someone adds a VOP_MMAP() call to
> > the kernel on a char device some day, IMHO it should panic.
> 
> Pardon my ignorance about how the calls work their way down to the VOP
> level, which I think will be evident from this question.
> 
> Are you suggesting that calling mmap() on character devices isn't
> reasonable,

no

> or that such a call shouldn't show up as VOP_MMAP() at the
> vnode layer?

yes

The call path is sys_mmap -> uvm_mmap -> VOP_MMAP *or* udv_attach,
for non-chars and chars, respectively.

-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"