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 Patch by Vincent Duvert: 2009-09-29 13:07:10 +00:00
disk_device_manager * Got rid of the duplicated functionalities provided by RWLocker.cpp, and 2009-10-12 14:29:05 +00:00
fs Reverted the part of r31520 that made devfs_unpublish_partition() take a raw 2010-01-09 03:55:38 +00:00
platform add header & (c) 2008-11-01 20:33:39 +00:00
posix * Adding msg{rcv,snd,get,ctl} syscalls to the system 2008-09-11 15:03:01 +00:00
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 Added block_cache_used_memory() that returns the memory allocated by all 2008-08-06 00:09:31 +00:00
boot_device.h * vfs_boot.cpp now also exports gReadOnlyBootDevice which is true when the 2009-06-05 15:52:58 +00:00
boot_item.h * Changed get_boot_item() API: it now also can retrieve the size of the boot 2008-03-30 11:01:41 +00:00
boot_splash.h * Added an explicit boot_splash_uninit(). Not really needed, but makes 2008-07-09 15:25:01 +00:00
commpage.h Split the commpage initialization into two parts. The second part is executed 2009-06-24 13:53:58 +00:00
condition_variable.h Coding style cleanups. Thanks axeld. 2009-12-03 13:05:39 +00:00
console.h Made the header C++ safe. 2005-05-26 09:08:54 +00:00
cpu.h * Added cpu_ent::running_thread which is maintained by the schedulers. 2009-12-11 19:06:57 +00:00
debug_heap.h Replaced the temporary storage used in the kernel debug command parser. We now 2009-06-03 12:28:49 +00:00
debug_paranoia.h Fixed build for paranoia disabled globally, but enabled for individual 2008-04-29 18:42:31 +00:00
debug.h Added debug_strlcpy() for use in the kernel debugger. 2009-10-01 03:02:34 +00:00
debugger_keymaps.h * Let's keep the alphabetical order 2008-06-20 22:45:33 +00:00
elf_priv.h * Added GNU style ELF symbol versioning support in the kernel, too. 2009-05-21 15:08:42 +00:00
elf.h * Allow to use symbols as variables (prefixed with '@'). Now only tab completion 2009-10-22 11:44:29 +00:00
file_cache.h * Moved the VM headers into subdirectory vm/. 2009-12-02 18:05:10 +00:00
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 * Introduced new header directory headers/private/system which is supposed 2008-05-14 03:55:16 +00:00
heap.h * Introduced {malloc,memalign,free}_etc() which take an additional "flags" 2010-01-27 12:45:53 +00:00
int.h * Introduce a (private) flag B_NO_HANDLED_INFO for install_io_interrupt_handler. 2009-02-17 21:41:51 +00:00
kdevice_manager.h * Integration of the new driver architecture. 2008-05-26 16:52:27 +00:00
kdriver_settings.h * Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER() 2008-06-05 23:19:27 +00:00
kernel_c++_structs.h Attempt at allowing to use C++ structures in C only code: We use the 2009-12-02 10:56:10 +00:00
kernel_daemon.h * Refactored the kernel daemon code into a class. 2008-08-22 01:13:18 +00:00
kernel.h * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of 2009-08-03 12:39:56 +00:00
kimage.h headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than 2009-07-27 00:39:12 +00:00
kmodule.h * Call module_init_post_boot_device() right after the boot volume has 2008-09-26 23:59:53 +00:00
kscheduler.h * All scheduler implementations: 2009-12-13 21:18:27 +00:00
ksignal.h * Implemented sigwait(). 2008-04-01 12:15:14 +00:00
ksyscalls.h Also include info about the syscall return type in the 2008-02-07 16:03:00 +00:00
ksystem_info.h * Implemented a (private for now) get_system_info_etc() call, that can retrieve 2008-09-17 16:27:17 +00:00
listeners.h Changed ConditionVariable from class to struct to make it more C-friendly. 2009-06-22 23:49:05 +00:00
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 * The kernel's address space is now also a resource that is known to the low 2009-11-27 13:03:28 +00:00
messaging.h Added _user_unregister_messaging_service(). Fixed second send_message() proto. 2005-01-24 01:19:03 +00:00
MessagingServiceDefs.h Removed obsolete struct. 2005-01-30 01:11:33 +00:00
Notifications.h DefaultNotificationService: 2009-12-21 20:56:50 +00:00
port.h * delete_owned_ports() no longer scans the whole port array for ports belonging 2009-10-26 13:34:43 +00:00
real_time_clock.h Applied patch by Julun: time computations based on an algorithm by Fliegel, 2007-10-14 17:27:44 +00:00
safemode.h * Introduced new header directory headers/private/system which is supposed 2008-05-14 03:55:16 +00:00
scheduling_analysis.h Changed ConditionVariable from class to struct to make it more C-friendly. 2009-06-22 23:49:05 +00:00
sem.h * Semaphores are now put into the team struct in a doubly linked list. 2009-10-23 02:06:51 +00:00
smp.h * Inline {acquire,release}_spinlock(), when spinlock debugging is disabled. 2010-01-11 22:13:11 +00:00
syscall_restart.h * Removed SyscallRestartWrapper comparison operators. They are not 2008-04-12 17:18:31 +00:00
system_profiler.h * It seems we always have to specify all flags to make it work; removed "flags" 2009-07-21 12:09:15 +00:00
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 Fix gcc4 build. 2009-09-25 14:36:26 +00:00
tracing.h * arch_debug_get_stack_trace(): 2009-12-22 15:15:07 +00:00
user_atomic.h Some ppc fixes for #4115, patch by kallisti5 (without the #ifdef _BOOT_MODE): 2009-08-03 10:10:22 +00:00
user_debugger.h Inherit the disable_debugger() flag to a fork()ed child. load_image() doesn't 2009-09-28 02:54:38 +00:00
usergroup.h * Introduced ref-counting for the I/O contexts. 2009-03-02 00:26:22 +00:00
vfs.h * Introduced {malloc,memalign,free}_etc() which take an additional "flags" 2010-01-27 12:45:53 +00:00
wait_for_objects.h * Removed select_sync::lock. The only thread that was still locking was 2008-04-30 16:12:20 +00:00