From owner-freebsd-hackers Sun Feb 23 1:50: 6 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15D5437B401 for ; Sun, 23 Feb 2003 01:50:05 -0800 (PST) Received: from phoenix.infradead.org (phoenix.infradead.org [195.224.96.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2519C43F75 for ; Sun, 23 Feb 2003 01:50:04 -0800 (PST) (envelope-from hch@infradead.org) Received: from hch by phoenix.infradead.org with local (Exim 4.10) id 18msli-00041Z-00; Sun, 23 Feb 2003 09:49:58 +0000 Date: Sun, 23 Feb 2003 09:49:58 +0000 From: Christoph Hellwig To: Terry Lambert Cc: Byunghyun Oh , freebsd-hackers@freebsd.org Subject: Re: Replacement for get_user_pages() of Linux Message-ID: <20030223094958.A15347@infradead.org> References: <20030223163746.A19421@shell.postech.ac.kr> <3E588B1B.484C4D61@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3E588B1B.484C4D61@mindspring.com>; from tlambert2@mindspring.com on Sun, Feb 23, 2003 at 12:49:31AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 23, 2003 at 12:49:31AM -0800, Terry Lambert wrote: > I've been unable to find any documentation on get_user_pages(), > and you didn't provide a link to any. > > But looking at the source code, the reason for doing this is to > permit DMA directly into user pages. > > I don't understand what you mean by "pin", in this context. get_user_pages() does the following: (1) force all pages into physical memory if they weren't before (2) increment the usage count on the to avoid paging them out The latter is usually called page pinning. > You are aware that FreeBSD has a unified VM and buffer cache, and > all user pages for the current process are automatically visible > in th kernel address space, with no need to call something like > get_user_pages() to establish a mapping, right? get_user_pages() does not establish a mapping, in Linux you don't need a kernel mapping to perform DMA on memory. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message