Page MenuHomeFreeBSD

vm_object_coalesce(): do not account holes twice
Needs ReviewPublic

Authored by kib on Wed, Dec 17, 4:38 AM.
Tags
None
Referenced Files
F139909520: D54263.diff
Wed, Dec 17, 9:47 PM
F139887352: D54263.id.diff
Wed, Dec 17, 3:23 PM
F139880712: D54263.diff
Wed, Dec 17, 1:13 PM
F139870423: D54263.id168243.diff
Wed, Dec 17, 9:22 AM
Unknown Object (File)
Wed, Dec 17, 4:53 AM
Subscribers

Details

Reviewers
alc
markj
Summary
alc wrote:
Suppose that the object is OBJ_ONEMAPPING and that we, in fact,
have a single mapping to it. Then, we punch a hole in that mapping.
vm_map_entry_delete() only subtracts from the object's charge when
we shrink the size of the object. Now, suppose that we perform
mmap(MAP_ANON) to reallocate some of the hole. Aren't we going to add to
the charge here, even though vm_map_entry_delete() never subtracted from
the charge for the hole that was created?

Only account the change in the charged object size that was added to it.
Also remove ifdef-ed block that tried to correct charge and that is
not needed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped