git: kernel - Improve cluster_read()

看板DFBSD_commit作者時間16年前 (2010/02/09 02:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 6b84c93eb3b1e5815f00edf82f94fa12b79a9cc1 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Feb 8 09:51:05 2010 -0800 kernel - Improve cluster_read() * The cluster_read() code was tripping over itself due to a findblk() call which caused it to believe it had found a buffer hole when it really found a busy buffer. Redo the code to use the FINDBLK_TEST flag to locate the next buffer hole. Also add a shortcut to support efficient coding for larger read-ahead values. * Change the single-read-ahead in cluster_read() to a multiple-read-ahead based on the maxra parameter. Before we just did a single read-ahead and even though this was a cluster read it still created a situation where the next cluster_read(0 operation would stall on previous read-ahead before issuing the next one. In otherwords, it wasn't pipelining requests as well asit could. This change tries to keep at least two read-aheads in progress so when the next cluster_read() stalls on the first one the second one is still in the pipeline after it unstalls, allowing it to issue the third one to keep the pipeline hot. * These changes improve SSD swapcache operation as well as normal HD cluster_read() pipelining. In addition the read-ahead is now sufficient to keep the pipeline hot across a 2 x Swap (interleaved) setup. Summary of changes: sys/kern/vfs_cluster.c | 88 ++++++++++++++++++++++++++++++------------------ 1 files changed, 55 insertions(+), 33 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6b84c93eb3b1e5815f00edf82f94fa12b79a9cc1 -- DragonFly BSD source repository
文章代碼(AID): #1BS5Yhbp (DFBSD_commit)