- on CACHE_DURING_BOOT init benaphore count with 1.
- account for allocated space on early_allocate_pages.
- fixed slab position calculation in small slabs.
- we can now init all allocator sizes early rather than later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20914 a95241bf-73f2-0310-859d-f6bbb57e9c96
Reversed arguments in kernel settings file, now you only need to uncomment a line
to get the non-default setting. Explained default setting in comments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20907 a95241bf-73f2-0310-859d-f6bbb57e9c96
- call the reclaimer callback when low on memory.
- use the depot when on multi-cpu setups (for scalability).
- fixed the amount of memory spent on slabs for very large objects.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20889 a95241bf-73f2-0310-859d-f6bbb57e9c96
close all of its file descriptors), code outside of the core kernel would be executed
in the descriptor's close/free hooks.
Since the semaphore timeout code, and send_data()/receive_data() rely on the
thread being available in the thread hash, they wouldn't work anymore.
This fixes bug #1168. Thanks to Marcus for providing such a nice test case :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20808 a95241bf-73f2-0310-859d-f6bbb57e9c96
quite a bit in the past already); it somehow doesn't work right with how semaphores
are used in BeOS/Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20759 a95241bf-73f2-0310-859d-f6bbb57e9c96
threads with higher priorities a much better scheduling experience, it
also creates a problem as soon as more than one higher priority thread
waits on a resource held by a lower priority thread; the higher priority
threads play ping-pong, and the lower priority thread doesn't get it's
chance.
* Increased the probability of skipping a thread priority.
* I won't do any other changes on the scheduler, that's meianote's job now :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20758 a95241bf-73f2-0310-859d-f6bbb57e9c96
This should fix the loader problem some folks were seeing on beos binaries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20732 a95241bf-73f2-0310-859d-f6bbb57e9c96
The solution is less than optimal, but should work for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20722 a95241bf-73f2-0310-859d-f6bbb57e9c96
a function pointer, which it isn't.
The mistake was probably made because there appears to be multiple stdio implementations
in the tree (BSD and glibc) so it's easy to look at the wrong code. Perhaps
we should clean that up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20720 a95241bf-73f2-0310-859d-f6bbb57e9c96
so we can't easily check if the remaining mappings are valid - therefore I disabled
the check completely.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20654 a95241bf-73f2-0310-859d-f6bbb57e9c96
if the page is currently copied, the source page still has mappings.
* vm_copy_on_write_area() did not set the cache type for the upper cache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20530 a95241bf-73f2-0310-859d-f6bbb57e9c96
* read_dir() is supposed to return B_OK and and a count of 0 when
reaching the end of the directory. In case the node in question could
not be found, we were looping infinitely.
* free_dir_cookie() was not invoked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20519 a95241bf-73f2-0310-859d-f6bbb57e9c96
small to hold the information for the requested I/O size.
* get_file_map() returned B_BUFFER_OVERFLOW already in case the array
was exactly as large as needed.
* read_chunk_into_cache() and write_chunk_to_cache() will no longer
override their local "size" variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20509 a95241bf-73f2-0310-859d-f6bbb57e9c96
sets a fault handler, so that an invalid memory access while executing
the command (address typos always do the trick :-) won't result in
another KDL session on top of the current one, which wouldn't even be
"cont"able.
All pieces of code setting a fault handler do now save and reset the
previous one, so that e.g. a user_memcpy() in a debugger command doesn't
disturb the mechanism.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20500 a95241bf-73f2-0310-859d-f6bbb57e9c96
unload_kernel_add_on(). The former one could lead to deadlocks with
load_kernel_add_on() (e.g. occasionally the boot process would hang).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20485 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added a few comments.
* Simplified the nested while loops by dropping the special handling for the
first iovec and restructuring the innermost loop. This also rules out
the possibility of a zero-length temporary vec. IMHO the readability
has improved quite a bit (YMMV :-). Hopefully without introducing new
bugs; please review!
* Corrected computation of totalSize in case less than size has been
read/written.
* Also set *_numBytes in case all fileVecs have been processed. Only
relevant in case the request extends beyond the end of file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20483 a95241bf-73f2-0310-859d-f6bbb57e9c96
filling them which could have written over the stack, and their iovec length
was set for the wrong iovec, potentially clobbering any memory.
* The first tempVec was usually empty, anyway, as the wrong iovec was chosen
to start from (usually one too early).
* The tempVec loop is now repeated until the whole fileVec is completed.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20476 a95241bf-73f2-0310-859d-f6bbb57e9c96
in.
* New debugger command "find_page", which searches all page queues to
find out, which one a page is actually in.
* Solved nasty race condition between the page scrubber and
vm_page_allocate_page_run(): The page scrubber didn't mark the pages
it was processing busy, so that vm_page_allocate_page_run() could claim
them in the meantime. They would end up in the clear pages queue,
although being assigned to a cache at the same time. This should
finally solve bug #1056.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20474 a95241bf-73f2-0310-859d-f6bbb57e9c96
being merged in vm_cache_remove_consumer(), fault_find_page() tried again
with the current vm_cache_ref, but didn't realize it might have had inserted
a busy page in this cache already.
This fixes a deadlock, as this page would never get unbusy again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20470 a95241bf-73f2-0310-859d-f6bbb57e9c96