Searched +hist:2 +hist:f14f5ee (Results 1 - 1 of 1) sorted by relevance
/haiku/src/system/kernel/cache/ | ||
H A D | block_cache.cpp | diff 6d336fda Wed Jul 10 18:43:32 MDT 2019 Augustin Cavalier <waddlesplash@gmail.com> block_cache: Compute the timeout dynamically based on write speeds. We now record how long it takes to write a block (on average), and then utilize this information to reduce the timeout write thread's timeout (to 2 * block_count * average_block_time, so we don't completely congest the drive.) Remove the "TODO" about the I/O scheduler; this new logic will be just fine even under an I/O scheduler. Note that this change goes both ways: while faster writes mean more writes and quicker, slower writes will increase the timeout before we do another one also. This then also guards against queueing another write while one is already in progress, which was not handled before. Tested in KVM. Even on a SATA-backed spinning HDD, this reduces the timeout to around *200ms* on average (!!), so a 10x improvement. On a ramdisk, it reduces the timeout to *10-30ms* (!!!) on average, so a 100-200x improvement, so this change will benefit everyone but SSDs especially. Since BFS inode and journal writes always go through the block_cache, this very dramatically improves inode-related write performance. The "stop and start" stutters when emptying or moving items to Trash seem totally gone, among a lot of other things. Change-Id: I41f46a6432ce1f50f896a853abdfe22dde0ba327 diff eb26e782 Mon Jul 27 08:59:39 MDT 2009 Axel Dörfler <axeld@pinc-software.de> * Decoupled block_cache_used_memory() from the sCachesLock - this should fix the UI freezes (ActivityMonitor and ProcessController both use get_system_info() a lot), although this is only the symptom of another problem. * The downside is that the block cache usage information isn't as up to date as it was previously - it's updated by the block write/notifier thread now (worst case every 2 seconds). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31812 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff d1cad268 Fri Apr 10 03:55:04 MDT 2009 Axel Dörfler <axeld@pinc-software.de> * Added an insane block cache tracing mode that will also log the whole block data. This is available when BLOCK_CACHE_BLOCK_TRACING is 2 or greater. * Completely untested as of now, though. Will do so soon. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30104 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff c33667d4 Sun Feb 01 13:48:02 MST 2009 Michael Lotz <mmlr@mlotz.ch> Fixing warnings under GCC4 in preparation to enable -Werror there as well: * Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 2f14f5ee Sun Jul 20 18:30:16 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> axeld + bonefish + mmlr: * Added trace entry for block reads from disk. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26534 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 2f14f5ee Sun Jul 20 18:30:16 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> axeld + bonefish + mmlr: * Added trace entry for block reads from disk. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26534 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 816957bd Thu Apr 03 05:21:00 MDT 2008 Axel Dörfler <axeld@pinc-software.de> * Decoupled notifications from the block cache functions; they are now called without having the cache's lock held. * The only downside to this approach is that ending a transaction now needs additional memory, and might therefore fail - that could be fixed by allocating that memory upfront with the start of the new transaction, though. * Therefore, I reverted the cache lock to a benaphore, as the recursive lock is no longer needed. * The block writer thread is now a block writer and notifier thread: it will wait for up to 2 seconds on the sEventSemaphore, and if nothing comes in, it will continue with its previously sole job. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24768 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 16d8ff2d Wed Apr 02 03:37:22 MDT 2008 Axel Dörfler <axeld@pinc-software.de> * Added a TRANSACTION_IDLE notification that is sent when the transaction hasn't been used for more than 2 seconds. * Replaced the block_cache::lock benaphore with a recursive lock, so that you can call cache functions from within the notification listeners. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24737 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff fae99f15 Fri Mar 14 16:03:26 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> cached_block::Compare() was ignoring the upper 32 bit of the block number. Was a problem only for partitions > 2^32 * block size (4TB for 1KB blocks). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24393 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 2e5ac352 Thu Jan 26 09:42:12 MST 2006 Jérôme Duval <korli@users.berlios.de> fixed some traces cache_abort_sub_transaction now doesn't crash if parent_cache is NULL (happens in low memory situations) Axel, please review and fix if needed git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16105 a95241bf-73f2-0310-859d-f6bbb57e9c96 |
Completed in 183 milliseconds