cvs commit: src/sys/vm vm_map.c device_pager.c

Emiel Kollof emiel at
Wed Jul 21 01:02:38 PDT 2004

Hash: SHA1

On Wednesday 21 July 2004 03:25, Matthew Dillon wrote:
> dillon      2004/07/20 18:25:19 PDT
> DragonFly src repository
>   Modified files:
>     sys/vm               vm_map.c device_pager.c
>   Log:
>   Fix a device pager leak for the case where the page already exists in the
>   VM object (typical case: multiple mappings of the device?).  If the page
>   already exists we simply update its physical address.  It is unclear
> whether the physical address would ever actually be different, however.

- From Christian:

EK> Oh, those patches you sent me were comitted. The commit mail is
EK> attached to this mail.

CZ> Excellent. To answer Matthew's question, the case where the physical
CZ> addresses differ is the one the msync(MS_INVALIDATE) hack is meant to
CZ> work around: the driver allocates kernel memory for DMA buffers, and
CZ> maps them into the RM client's address space. Since there's little to
CZ> no context information available in d_mmap, a contiguous address range
CZ> must be used as mmap(2) offsets for such memory allocations, in order
CZ> for the RM to determine which allocation is targeted; for now, this is
CZ> the virtual address range of the kernel memory allocation.
CZ> Upon reallocation, the corresponding physical address are unlikely to
CZ> match the old ones; the msync hack forces reevaluation of the offsets.
CZ> This ensures that d_mmap is called and not cached translations used.

I tested this patch extensively :) It works.

- -- 
George Washington was first in war, first in peace -- and the first to
have his birthday juggled to make a long weekend.
		-- Ashley Cooper
Version: GnuPG v1.2.4 (FreeBSD)


More information about the Commits mailing list