Page MenuHomeFreeBSD

Remove support for idle page zeroing.
ClosedPublic

Authored by markj on Aug 31 2016, 12:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 12:14 AM
Unknown Object (File)
Mon, Nov 18, 1:54 PM
Unknown Object (File)
Thu, Nov 7, 8:14 PM
Unknown Object (File)
Wed, Nov 6, 9:56 PM
Unknown Object (File)
Tue, Nov 5, 9:15 AM
Unknown Object (File)
Mon, Nov 4, 6:20 PM
Unknown Object (File)
Sat, Nov 2, 8:51 PM
Unknown Object (File)
Oct 16 2024, 11:20 PM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj retitled this revision from to Remove support for idle page zeroing..
markj edited the test plan for this revision. (Show Details)
kib added a reviewer: kib.
This revision is now accepted and ready to land.Aug 31 2016, 3:01 PM
imp added a reviewer: imp.

seems reasonable to me (in that it does what it says it does), but what's the motivation?

In D7714#160303, @imp wrote:

seems reasonable to me (in that it does what it says it does), but what's the motivation?

The motivation was to make it a bit easier to create fast paths in the page allocator. Right now, vm_page_zero_count and vm_page_zero_idle_wakeup() are protected by the heavily-contended free page queue mutex. I'd like to be able to free a page to a superpage reservation without having to acquire this lock, for example.

Moreover, the feature seems quite broken: on multicore amd64 systems, the idle-priority pagezero thread induces a priority inversion by holding the free page lock while other higher-priority threads spin on it. Kostik also pointed out that vm_pagezero() yields the CPU while holding the free page lock in !PREEMPTION kernels, which seems incorrect. Further, I note that we potentially wake up pagezero after freeing a page to a reservation, but such pages do not belong to the physical memory allocator and are thus not visible to pagezero in vm_phys_zero_pages_idle(). Given that this feature has been disabled by default since r170816, I think it's reasonable to remove it.

Thanks @markj for elaborate explanation; please include at least an excerpt of it in the commit log.

alc edited edge metadata.
This revision was automatically updated to reflect the committed changes.