* Added inode ID member to BaseDevice to make this possible.
* Removed unused and unmaintained legacy_driver::devices_published field.
* Implemented legacy driver's unpublish_driver().
* Reenabled legacy driver reloading on changes.
* Renamed devfs_driver_{added|removed}() to driver_{added|removed}(), and
made them private.
* Simplified deletion of device_node lists (no need to use an iterator here),
added device unpublishing.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27033 a95241bf-73f2-0310-859d-f6bbb57e9c96
maximal size.
* Turned off debug output accidently enabled with the last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27006 a95241bf-73f2-0310-859d-f6bbb57e9c96
Ingo suggestions: instead of having one global sem_undo list,
we now have two local list, one per semaphore set and one per team
which is held in its xsi_sem_context structure, along with a mutex.
A mutex has also been added to the semaphore set class in order to
protect the local list, but also in order to (hopefully) improve
concurrency.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26993 a95241bf-73f2-0310-859d-f6bbb57e9c96
the kernel settings. Settings that were checked in the kernel (like on-screen
debug output) didn't work anymore, because when handing the settings over to
the kernel it would have copied only the old size part of the safemode file.
* Add a newline when the kernel and safemode settings are combined. Otherwise
the first safemode and last kernel setting would get lost if the kernel
settings file didn't end with a newline.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26992 a95241bf-73f2-0310-859d-f6bbb57e9c96
currently points to /etc for the system, and dedicated "data" directories
for common/user (the system directory should get a dedicated "data", too,
though).
* Added B_USER_CACHE_DIRECTORY (in config/cache).
* These additions were discussed some years ago, but I just had a good reason
to use them :-)
* Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26990 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Moved the static functions to the beginning of the file.
* Renamed several variables for more clarity, particularly
offset/cacheOffset to index/pageIndex in case where the unit is pages.
* _SwapBlock{Build,Free}() can deal with a range of pages now, which
should be more efficient.
* Additional checks/panics in swap_page_alloc().
* swap_file_add(): Wrong byte count was used when allocating and
clearing the bitmap.
* swap_page_alloc(): Fixed off-by-one check. The last page of the swap
file could not be used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26975 a95241bf-73f2-0310-859d-f6bbb57e9c96
our dma_restrictions structure (but we're using blocks instead of bytes,
since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
heap.
* Allocate IOBuffers, IORequests, and cookies on the VIP I/O heap, if
necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26969 a95241bf-73f2-0310-859d-f6bbb57e9c96
heap_class object now. Removed unused heap_allocator::heap_class.
* Made heap_class, heap_create_allocator(), heap_memalign(), heap_free()
public, so that a specialized allocator can be used elsewhere in the
kernel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26965 a95241bf-73f2-0310-859d-f6bbb57e9c96
tracing entry classes.
* Added new "scheduler" command, available when scheduler tracing is
enabled. It analyzes the tracing entries for a given thread and prints
scheduling statistics for that thread. Should hopefully help to
understand the poor scheduling latencies in certain cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26956 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed TraceEntryIterator::Current(): If fEntry was NULL, it would
return 0x4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26955 a95241bf-73f2-0310-859d-f6bbb57e9c96
(fault address, pc, read/write) when a page fault occurs, and print them
in case this caused the termination of a debugger command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26949 a95241bf-73f2-0310-859d-f6bbb57e9c96
marked modified again, so that we don't lose its data when someone
decides to steal it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26939 a95241bf-73f2-0310-859d-f6bbb57e9c96
now also free swap space assigned to pages that are rather active.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26938 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added functions swap_free_page_swap_space(), swap_available_pages(),
and swap_total_swap_pages(). They will be used by the page daemon
code.
* Free allocated swap space in the VMAnonymousCache destructor.
* Write(): First free swap space assigned to the pages to be written
(was leaked before) and update fAllocatedSwapSize upfront. Both is now
done with the cache locked, as it should be.
* Fixes several instance where the cache offset in bytes was used
instead of in pages.
* Print the correct error when _kern_write_stat() fails.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26926 a95241bf-73f2-0310-859d-f6bbb57e9c96
if after the main loop the transfer is already block aligned, we still
have to check whether the last vec is a bounce buffer that is shorter
than a complete block, but exceeds the original end of the request. If
so, we have to cut back to the previous block and add a block-sized
bounce buffer instead. Actually that's almost the same case as when the
transfer length is not yet block aligned, and thus we let the same code
handle it. Fixes bug #2584.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26910 a95241bf-73f2-0310-859d-f6bbb57e9c96
loop.
* This is probably the cause for file corruptions as well as bug #2595; will
have another look tomorrow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26905 a95241bf-73f2-0310-859d-f6bbb57e9c96
* segmentCount was potentially set incorrectly. It could be too big,
since we considered all vecs, not only those remaining.
* The main loop condition was incorrect. This would lead to too few
DMABuffer vecs (or none at all) for any but the first IOOperation of a
request. Should fix#2586.
* Correctly offset by vecIndex in debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26881 a95241bf-73f2-0310-859d-f6bbb57e9c96
specifying the protection of each page (4 bits per page).
* Added no-op implementation of posix_madvise().
* Replaced a few "addr_t size" parameters by "size_t size".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26871 a95241bf-73f2-0310-859d-f6bbb57e9c96
with the VMCache lock held, and WriteModified() locks itself.
* Added an assertion that the lock is held when calling that method.
* This fixes a KDL as soon as you would have used O_NOCACHE with a file that
had already some pages read in.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26864 a95241bf-73f2-0310-859d-f6bbb57e9c96
* dir_read() now takes into account that we may have read more than one dir
entry, and calls fix_dirent() for each of them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26859 a95241bf-73f2-0310-859d-f6bbb57e9c96
* If a segment violation occurs, we do now check whether the thread in
question has a handler for SIGSEGV. If so, we just send it the signal.
Otherwise we notify the debugger as before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26851 a95241bf-73f2-0310-859d-f6bbb57e9c96
the cache locked, since it enters the VFS and might reenter VMCache,
thus causing deadlocks. Fixes bug #2577.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26849 a95241bf-73f2-0310-859d-f6bbb57e9c96
dedicated functions.
* Introduced gMappedPagesCount variable which counts the total number of
physical pages that are mapped.
* Added vm_page_get_stats() which fills in the memory related part of
the system_info structure. Used and cached pages are computed
differently, now. The "available" (== not committed) memory is no
longer used for the computation as it doesn't say anything about the
actually used/free pages (with swap support enabled it is even
less meaningful, since we first commit swap space when possible).
We do also consider the memory used by the block cache as cached
pages, now. All in all these changes should fix the memory statistics
reported by get_system_info(), IOW bug #2574.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96