Searched +hist:6 +hist:d336fda (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 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 6a7f219c Wed Mar 03 07:39:26 MST 2010 Axel Dörfler <axeld@pinc-software.de> * block_notifier_and_writer() will now flush 1000 blocks when reaching the soft memory limit. * Improved debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35735 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 6cef245e Tue Apr 22 12:32:15 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Detemplatized ConditionVariable{Entry}. Merged them with their respective Private* base class. * Changed sigwait() and sigsuspend() to use thread_block() instead of a condition variable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 6eabbacd Tue Jan 22 01:16:04 MST 2008 Axel Dörfler <axeld@pinc-software.de> * Fixed compare_blocks() function; it actually gets cached_block**. * Added block_writer thread that continuously writes back blocks for all current block caches. * A block cache now maintains the number of dirty blocks if it doesn't use transactions. That knowledge could also be used in block_cache_sync()... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23698 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 6a7f219c8d45d3ef0137d92b87b219e3482102a5 Wed Mar 03 07:39:26 MST 2010 Axel Dörfler <axeld@pinc-software.de> * block_notifier_and_writer() will now flush 1000 blocks when reaching the soft memory limit. * Improved debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35735 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 6cef245eca821584f07f5a13558f51ec586852e8 Tue Apr 22 12:32:15 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Detemplatized ConditionVariable{Entry}. Merged them with their respective Private* base class. * Changed sigwait() and sigsuspend() to use thread_block() instead of a condition variable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96 diff 6eabbacd7065eb177a232c59eff3dc5f0e59f480 Tue Jan 22 01:16:04 MST 2008 Axel Dörfler <axeld@pinc-software.de> * Fixed compare_blocks() function; it actually gets cached_block**. * Added block_writer thread that continuously writes back blocks for all current block caches. * A block cache now maintains the number of dirty blocks if it doesn't use transactions. That knowledge could also be used in block_cache_sync()... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23698 a95241bf-73f2-0310-859d-f6bbb57e9c96 |
Completed in 130 milliseconds