From owner-freebsd-hackers Wed Feb 17 11: 9: 9 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (Postfix) with ESMTP id EE1CF114CB for ; Wed, 17 Feb 1999 11:09:05 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id MAA16503; Wed, 17 Feb 1999 12:09:05 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd016224; Wed Feb 17 12:08:42 1999 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id MAA22366; Wed, 17 Feb 1999 12:08:25 -0700 (MST) From: Terry Lambert Message-Id: <199902171908.MAA22366@usr07.primenet.com> Subject: Re: Memory-Based VFS Question To: dillon@apollo.backplane.com (Matthew Dillon) Date: Wed, 17 Feb 1999 19:08:25 +0000 (GMT) Cc: amarks@sarnoff.com, tlambert@primenet.com, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199902171838.KAA09129@apollo.backplane.com> from "Matthew Dillon" at Feb 17, 99 10:38:16 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :> 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