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

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


-----BEGIN PGP SIGNED MESSAGE-----
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.
EK> 

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> 
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.

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

iD8DBQFA/iLO/MIV8fYUO6wRAomeAJ9ePJmQ2aNa1v///pA5gJPJOPSwJgCbBpZ7
90qzx8feHVUTGt/wx0ASi2Y=
=+6qp
-----END PGP SIGNATURE-----






More information about the Commits mailing list