haiku/headers/private/kernel
Ingo Weinhold 40bb94819e * Removed useless return parameter from vm_remove_all_page_mappings().
* Added vm_clear_page_mapping_accessed_flags() and
  vm_remove_all_page_mappings_if_unaccessed(), which combine the functionality
  of vm_test_map_activation(), vm_clear_map_flags(), and
  vm_remove_all_page_mappings(), thus saving lots of calls to translation map
  methods. The backend is the new method
  VMTranslationMap::ClearAccessedAndModified().
* Started to make use of the cached page queue and changed the meaning of the
  other non-free queues slightly:
  - Active queue: Contains mapped pages that have been used recently.
  - Inactive queue: Contains mapped pages that have not been used recently. Also
    contains unmapped temporary pages.
  - Modified queue: Contains unmapped modified pages.
  - Cached queue: Contains unmapped unmodified pages (LRU sorted).
  Unless we're actually low on memory and actively do paging, modified and
  cached queues only contain non-temporary pages. Cached pages are considered
  quasi free. They still belong to a cache, but since they are unmodified and
  unmapped, they can be freed immediately. And this is what
  vm_page_[try_]reserve_pages() do now when there are no more actually free
  pages at hand. Essentially this means that pages storing cached file data,
  unless mmap()ped, no longer are considered used and don't contribute to page
  pressure. Paging will not happen as long there are enough free + cached pages
  available.
* Reimplemented the page daemon. It no longer scans all pages, but instead works
  the page queues. As long as the free pages situation is harmless, it only
  iterates through the active queue and deactivates pages that have not been
  used recently. When paging occurs it additionally scans the inactive queue and
  frees pages that have not been used recently.
* Changed the page reservation/allocation interface:
  vm_page_[try_]reserve_pages(), vm_page_unreserve_pages(), and
  vm_page_allocate_page() now take a vm_page_reservation structure pointer.
  The reservation functions initialize the structure -- currently consisting
  only of a count member for the number of still reserved pages.
  vm_page_allocate_page() decrements the count and vm_page_unreserve_pages()
  unreserves the remaining pages (if any). Advantages are that reservation/
  unreservation mismatches cannot occur anymore, that vm_page_allocate_page()
  can verify that the caller has indeed a reserved page left, and that there's
  no unnecessary pressure on the free page pool anymore. The only disadvantage
  is that the vm_page_reservation object needs to be passed around a bit.
* Reworked the page reservation implementation:
  - Got rid of sSystemReservedPages and sPageDeficit. Instead
    sUnreservedFreePages now actually contains the number of free pages that
    have not yet been reserved (it cannot become negative anymore) and the new
    sUnsatisfiedPageReservations contains the number of pages that are still
    needed for reservation.
  - Threads waiting for reservations do now add themselves to a waiter queue,
    which is ordered by descending priority (VM priority and thread priority).
    High priority waiters are served first when pages become available.
  Fixes #5328.
* cache_prefetch_vnode(): Would reserve one less page than allocated later, if
  the size wasn't page aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-03 18:53:52 +00:00
..
arch Added missing include. 2010-02-03 18:47:07 +00:00
boot
disk_device_manager
fs Reverted the part of r31520 that made devfs_unpublish_partition() take a raw 2010-01-09 03:55:38 +00:00
platform
posix
slab * Introduced {malloc,memalign,free}_etc() which take an additional "flags" 2010-01-27 12:45:53 +00:00
util * Added optional allocator template parameter. 2010-01-25 12:18:20 +00:00
vm * Removed useless return parameter from vm_remove_all_page_mappings(). 2010-02-03 18:53:52 +00:00
block_cache.h
boot_device.h
boot_item.h
boot_splash.h
commpage.h
condition_variable.h
console.h
cpu.h
debug_heap.h
debug_paranoia.h
debug.h
debugger_keymaps.h
elf_priv.h
elf.h
file_cache.h
frame_buffer_console.h * If the VESA driver remaps the frame buffer on init, it will now also make 2010-01-01 14:54:41 +00:00
generic_syscall.h
heap.h * Introduced {malloc,memalign,free}_etc() which take an additional "flags" 2010-01-27 12:45:53 +00:00
int.h
kdevice_manager.h
kdriver_settings.h
kernel_c++_structs.h
kernel_daemon.h
kernel.h
kimage.h
kmodule.h
kscheduler.h * All scheduler implementations: 2009-12-13 21:18:27 +00:00
ksignal.h
ksyscalls.h
ksystem_info.h
listeners.h
lock.h Added new mutex_switch_from_read_lock() for unlocking a read lock and 2010-01-07 15:31:29 +00:00
low_resource_manager.h
messaging.h
MessagingServiceDefs.h
Notifications.h DefaultNotificationService: 2009-12-21 20:56:50 +00:00
port.h
real_time_clock.h
safemode.h
scheduling_analysis.h
sem.h
smp.h * Inline {acquire,release}_spinlock(), when spinlock debugging is disabled. 2010-01-11 22:13:11 +00:00
syscall_restart.h
system_profiler.h
team.h Changed the team shutdown process a bit: 2010-01-20 09:34:53 +00:00
thread_types.h Changed the team shutdown process a bit: 2010-01-20 09:34:53 +00:00
thread.h * All scheduler implementations: 2009-12-13 21:18:27 +00:00
timer.h
tracing.h * arch_debug_get_stack_trace(): 2009-12-22 15:15:07 +00:00
user_atomic.h
user_debugger.h
usergroup.h
vfs.h * Introduced {malloc,memalign,free}_etc() which take an additional "flags" 2010-01-27 12:45:53 +00:00
wait_for_objects.h