Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2003 00:49:31 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Byunghyun Oh <octphial@postech.ac.kr>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Replacement for get_user_pages() of Linux
Message-ID:  <3E588B1B.484C4D61@mindspring.com>
References:  <20030223163746.A19421@shell.postech.ac.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
Byunghyun Oh wrote:
> I'm porting Plex86 x86 VM, which uses get_user_pages() function at
> Linux-version kernel module to find and pin physical pages of memory
> in user space (according to its documentation). I tried many
> candidates as its replacement (PHYS_TO_VM_PAGE() macro in vm/vm_page.h
> seems most useful now), but they haven't worked at all.
> 
> Any experience about porting VM-related things in Linux will be
> appreciated. :)

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.

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?

Is the intent of this to allow the process memory to be addressed,
even though the process is not active?  If so, then what you want
to do is establish a kernel mapping for the pages, and mark them
non-swappable.

Otherwise, what you want is automatic (see uiomove).

-- Terry

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?3E588B1B.484C4D61>