aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mount.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2016-09-30 17:27:17 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2016-09-30 17:27:17 +0000
commit5bb81f9b2d45ff910ce508ed2eae661387f4c448 (patch)
treeb64578a28897f736f4d5dddd8cd8ddf44e5fb221 /sys/sys/mount.h
parent5a9c270ab691d4a42e340296aaf421a90c2b90c8 (diff)
downloadsrc-5bb81f9b2d45ff910ce508ed2eae661387f4c448.tar.gz
src-5bb81f9b2d45ff910ce508ed2eae661387f4c448.zip
vfs: batch free vnodes in per-mnt lists
Previously free vnodes would always by directly returned to the global LRU list. With this change up to mnt_free_list_batch vnodes are collected first. syncer runs always return the batch regardless of its size. While vnodes on per-mnt lists are not counted as free, they can be returned in case of vnode shortage. Reviewed by: kib Tested by: pho
Notes
Notes: svn path=/head/; revision=306512
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r--sys/sys/mount.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 7c2856ab2c32..94cabb6c241b 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -147,6 +147,7 @@ struct vfsopt {
* put on a doubly linked list.
*
* Lock reference:
+ * l - mnt_listmtx
* m - mountlist_mtx
* i - interlock
* v - vnode freelist mutex
@@ -166,8 +167,6 @@ struct mount {
int mnt_ref; /* (i) Reference count */
struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
int mnt_nvnodelistsize; /* (i) # of vnodes */
- struct vnodelst mnt_activevnodelist; /* (v) list of active vnodes */
- int mnt_activevnodelistsize;/* (v) # of active vnodes */
int mnt_writeopcount; /* (i) write syscalls pending */
int mnt_kern_flag; /* (i) kernel only flags */
uint64_t mnt_flag; /* (i) flags shared with user */
@@ -188,6 +187,11 @@ struct mount {
struct thread *mnt_susp_owner; /* (i) thread owning suspension */
#define mnt_endzero mnt_gjprovider
char *mnt_gjprovider; /* gjournal provider name */
+ struct mtx mnt_listmtx;
+ struct vnodelst mnt_activevnodelist; /* (l) list of active vnodes */
+ int mnt_activevnodelistsize;/* (l) # of active vnodes */
+ struct vnodelst mnt_tmpfreevnodelist; /* (l) list of free vnodes */
+ int mnt_tmpfreevnodelistsize;/* (l) # of free vnodes */
struct lock mnt_explock; /* vfs_export walkers lock */
TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */
TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/