DragonFly commits List (threaded) for 2004-07
Re: cvs commit: src/sys/vm vm_map.c device_pager.c
-----BEGIN PGP SIGNED MESSAGE-----
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
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
-----END PGP SIGNATURE-----