haiku/headers/private
Ingo Weinhold 3cd2094396 * Added new debug feature (DEBUG_PAGE_ACCESS) to detect invalid concurrent
access to a vm_page. It is basically an atomically accessed thread ID field
  in the vm_page structure, which is explicitly set by macros marking the
  critical sections. As a first positive effect I had to review quite a bit of
  code and found several issues.
* Added several TODOs and comments. Some harmless ones, but also a few
  troublesome ones in vm.cpp regarding page unmapping.
* file_cache: PrecacheIO::Prepare()/read_into_cache: Removed superfluous
  vm_page_allocate_page() return value checks. It cannot fail anymore.
* Removed the heavily contended "pages" lock. We use different policies now:
  - sModifiedTemporaryPages is accessed atomically.
  - sPageDeficitLock and sFreePageCondition are protected by a new mutex.
  - The page queues have individual locks (mutexes).
  - Renamed set_page_state_nolock() to set_page_state(). Unless the caller says
    otherwise, it does now lock the affected pages queues itself. Also changed
    the return value to void -- we panic() anyway.
* set_page_state(): Add free/clear pages to the beginning of their respective
  queues as this is more cache-friendly.
* Pages with the states PAGE_STATE_WIRED or PAGE_STATE_UNUSED are no longer
  in any queue. They were in the "active" queue, but there's no good reason
  to have them there. In case we decide to let the page daemon work the queues
  (like FreeBSD) they would just be in the way.
* Pulled the common part of vm_page_allocate_page_run[_no_base]() into a helper
  function. Also fixed a bug I introduced previously: The functions must not
  vm_page_unreserve_pages() on success, since they remove the pages from the
  free/clear queue without decrementing sUnreservedFreePages.
* vm_page_set_state(): Changed return type to void. The function cannot really
  fail and no-one was checking it anyway.
* vm_page_free(), vm_page_set_state(): Added assertion: The page must not be
  free/clear before. This is implied by the policy that no-one is allowed to
  access free/clear pages without holding the respective queue's lock, which is
  not the case at this point. This found the bug fixed in r34912.
* vm_page_requeue(): Added general assertions. panic() when requeuing of
  free/clear pages is requested. Same reason as above.
* vm_clone_area(), B_FULL_LOCK case: Don't map busy pages. The implementation is
  still not correct, though.

My usual -j8 Haiku build test runs another 10% faster, now. The total kernel
time drops about 18%. As hoped the new locks have only a fraction of the old
"pages" lock contention. Other locks lead the "most wanted list" now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 02:37:05 +00:00
..
app * Added private methods get_app_server_port() (that stores the server port, 2009-12-01 07:53:09 +00:00
audio
binary_compatibility * Added a basic tool tip API, and implementation. 2009-08-03 14:47:41 +00:00
bluetooth - sizeof(TYPE) would cause problems to instantiations of the class with void type 2010-01-03 22:35:18 +00:00
debug Added BDebugEventInputStream::Seek() to seek in the stream. Works for data 2009-07-28 18:51:38 +00:00
device Fix Device Kit build in debug mode. 2009-09-13 01:30:38 +00:00
drivers I am trying to help a bit with the transition from IDE to ATA stack. 2009-05-10 17:04:04 +00:00
firewire wakeup() means wake any waiting threads, so we use the relevant flags. this gives a reliable dv receive stream here. 2009-05-24 23:15:04 +00:00
fs_shell * Removed the O_* modes that we currently don't and probably won't support 2009-11-26 14:17:46 +00:00
graphics forgot to add this file in r33815 2009-10-28 21:37:38 +00:00
haiku_package Implemented a tool ("package") that implements creation and extraction of 2009-11-13 13:45:49 +00:00
input * Removed the pretty useless "Multifinger scrolling" option - it's now always 2009-10-06 14:30:57 +00:00
interface Use pthread_once() to guard the initialization of sPaletteConverter. This 2009-11-30 16:26:10 +00:00
kernel * Added new debug feature (DEBUG_PAGE_ACCESS) to detect invalid concurrent 2010-01-07 02:37:05 +00:00
libroot * This fixes the remaining warnings in exit.c 2009-11-26 17:00:09 +00:00
locale * Moved three locale-related headers back into a safe place (where no 2009-10-13 17:15:49 +00:00
mail
media * The static object construction and destruction is no longer random, but takes 2010-01-05 16:53:55 +00:00
midi
mount * Removed now obsolete notification (this was not even used in Tracker 2009-10-07 19:31:57 +00:00
net * Removed the interface fallback from the datalink module's is_local_address(). 2009-12-03 14:31:39 +00:00
print
runtime_loader Removed unused elf_version_info::hidden field. 2009-05-21 13:11:54 +00:00
screen_saver Suggestion from Rene: 2009-10-01 20:48:14 +00:00
shared Added boolean deleteIfOwning parameter to MakeEmpty(). 2009-12-12 18:17:15 +00:00
storage * Construct the MIME data base directories lazily. 2009-12-01 08:52:13 +00:00
support More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome. 2009-05-13 22:19:42 +00:00
syslog_daemon
system Added support for I/O scheduling events to the system profiler interface. 2009-12-19 14:33:29 +00:00
textencoding
tracker Partially implement ticket #4916: 2009-11-16 01:07:40 +00:00
usb_vision
userlandfs Added support for in-kernel node monitoring ({add,remove}_node_listener()). 2009-11-20 07:59:09 +00:00
vmdk Moved vmdkimage.h to a shareable place, cleaned it up a bit, and renamed it to 2009-10-01 03:08:46 +00:00