git: kernel - Refactor vnode_free_list, vnode reuse algorithm

看板DFBSD_commit作者時間16年前 (2010/02/23 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 04bd6171a2376758dca089a0ac0148432e60ebfc Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Feb 22 07:40:05 2010 -0800 kernel - Refactor vnode_free_list, vnode reuse algorithm * Rip out most of he VAGEx stuff. It might come back in another form later. * Split the vnode_free_list into three parts, separated by two markers (vnode_free_mid1 and vnode_free_mid2). * Insert vnodes on the free list based on the following. New vnodes are allocated from the base of the list. At the HEAD - If the vnode is VRECLAIMED (i.e. dead) end of first section - If the vnode has no cached VM or SWAP data end of second section - If the vnode has cached SWAP data and no cached VM at the TAIL - If the vnode has cached VM data * Implement a rover to slowly scan vnodes in the list when allocating and shift them to the appropriate section. This fixes a degenerate condition in the placement of the markers. * A Vnode is removed and usually immediately reinserted whenever it is accesesd by userland but not held open, giving us a LRU-like algorithm within each section of the list but non-LRU-like transits between sections of the list. Transits between sections are determined more by how the VM system recycles related VM cache pages. Cached SWAP data only occurs if the swapcache is turned on. * Future: Might use VAGE to implement a second go-around in the queue or a burst re-placement in the queue when the data set is found to be too big to fit. Summary of changes: sys/kern/vfs_lock.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 90 insertions(+), 7 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/04bd6171a2376758dca089a0ac0148432e60ebfc -- DragonFly BSD source repository
文章代碼(AID): #1BWiPfby (DFBSD_commit)