From c287bd058c9b183e8d10e8a3c8398a70085d60db Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 27 Mar 2009 14:58:34 -0700 Subject: [PATCH] more cap notes --- src/TODO | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/TODO b/src/TODO index 0879bacd39d72..5f50c7e52ff93 100644 --- a/src/TODO +++ b/src/TODO @@ -43,16 +43,20 @@ v0.8 kclient caps - explicit release -- pin inode only if dirty caps - - release on destroy_inode + - this makes open on client work better, since we care less about the mds 'wanted' value. + (we only need to update it if/when we release the caps we still want, or async on open + if we don't have them yet) - two session lists: dirty_caps, clean_caps - alternative #1: -- keep CAP_PIN on _all_ inodes +- keep CAP_PIN on _all_ inodes, and don't pin inodes with caps. - release on destroy_inode + - this will require some message preallocation trickery to avoid allocating on iput where possible. + - maybe maintain a pool of N release messages, each able to release M caps.. and add to the pool whenever we reach + N * M inodes with caps? and periodically send the release messages early IFF we can allocate a new message in its place... - we only need to worry about flushing dirty caps on a timely basis - getattr guaranteed safe +- higher memory utilization on the mds - on client reconnect we have TONS of caps to reassert... :/ what then? - the mds can't keep them all in the journal, so it'll need to reload some, and that's not reliable. so we'll still end up with inodes without valid caps. - but we'll still get all _open file_ caps. and everything else (except CWD) will need to be rediscovered via lookup @@ -62,8 +66,9 @@ alternative #2: - make clean_caps an lru - touch caps on revalidate - that should avoid releasing caps just prior to getattr -- maybe still pin cap inodes -- periodic trimmer to efficiently release caps in big batches +- maybe still pin cap inodes for now. + - eventually avoid it, using the release on destroy_inode strategy above +- periodic trimmer to efficiently release the oldest clean_caps in big batches -- 2.39.5