Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 1999 19:08:25 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        amarks@sarnoff.com, tlambert@primenet.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Memory-Based VFS Question
Message-ID:  <199902171908.MAA22366@usr07.primenet.com>
In-Reply-To: <199902171838.KAA09129@apollo.backplane.com> from "Matthew Dillon" at Feb 17, 99 10:38:16 am

next in thread | previous in thread | raw e-mail | index | archive | help
> :> It will use VOP_GETPAGES/VOP_PUTPAGES.
> :
> :Since the man page is not very instructive for these ops and I'm new to
> :the FreeBSD kernel, is there a particular source that I can model these
> :after? Should I just model after the generic functions
> :(vnode_pager_generic_...)?
> 
>     I would simply use the vnode_pager_generic_putpages/getpages() routines
>     to begin with.  Once you have everything working you can optimize it.

The generic code assumes a vnode as a backing store.  If he does not
have a vnode as a backing store, he can not use the generic code.

Basically, if he could use it, since that's the default that's
inherited from the default ops vector, it'd already be working,
and he wouldn't be asking the question.

He's asking, so ipso facto, he's not using a vnode as backing store.

This makes sense, since he said he's writing a new MFS; he's probably
managing the page allocation himself from the KVA space.


To answer the question: pattern your code after the code in the file
/sys/vm/device_pager.c's dev_pager_getpages()/dev_pager_putpages()
code, and you should be OK.

Matt was talking about creating vm_object_t aliases.  This would
actually be a place where they would be applicable, if the intent
was to halve the page mapping/unmapping code path for an MFS.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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