tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: Reclaiming vnodes
i'm still not entirely sure what the point of this patch is. i
understand it helps zfs, but i don't understand why or how. i'm
also curious what sort of testing you've done. i do not believe
that testing in qemu is sufficient. how does it affect systems
that recycle vnodes a lot, such as older systems running a build?
please get a bunch more testing done with this before commiting,
comparing loads that *would* have led to recycle with the old
scheme.
some comments no the code itself:
--- kern/vfs_subr.c 26 Jun 2009 18:58:14 -0000 1.383
+++ kern/vfs_subr.c 14 Sep 2009 00:57:28 -0000
@@ -90,6 +90,8 @@
* value can be done using atomic operations, without the interlock held.
*/
+#define QUEUEDEBUG 1
+
please make sure you do not commit this.
Index: sys/param.h
===================================================================
RCS file: /cvsroot/src/sys/sys/param.h,v
retrieving revision 1.350
diff -u -p -r1.350 param.h
--- sys/param.h 29 Jun 2009 05:47:35 -0000 1.350
+++ sys/param.h 14 Sep 2009 00:57:30 -0000
@@ -154,6 +154,12 @@
#ifndef BUFCACHE_VA_MAXPCT
#define BUFCACHE_VA_MAXPCT 20
#endif
+#ifndef VNODES_NUM_LOWAT
+#define VNODES_NUM_LOWAT 95 /* Min num in % of vnodes in
freelist */
+#endif
+#ifndef VNODES_NUM_HIWAT
+#define VNODES_NUM_HIWAT 99 /* Max num in % of vnodes in
freelist */
+#endif
#define VNODE_COST 2048 /* assumed space in
bytes */
#endif /* _KERNEL */
Index: conf/param.c
===================================================================
RCS file: /cvsroot/src/sys/conf/param.c,v
retrieving revision 1.62
diff -u -p -r1.62 param.c
--- conf/param.c 3 May 2009 21:25:44 -0000 1.62
+++ conf/param.c 14 Sep 2009 00:57:31 -0000
@@ -119,6 +119,8 @@ int tickadj = (240000 / (60 * HZ)) ? (24
int rtc_offset = RTC_OFFSET;
int maxproc = NPROC;
int desiredvnodes = NVNODE;
+int vreclaim_hiwat = ((NVNODE % 100) * VNODES_NUM_HIWAT);
+int vreclaim_lowat = ((NVNODE % 100) * VNODES_NUM_LOWAT);
u_int maxfiles = MAXFILES;
int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */
int maxexec = MAXEXEC; /* max number of concurrent exec() calls */
any particular reason to change param.h/param.c for this?
please put them somewhere less generic. maybe vfs_subr.c
and sys/vnode.h?
also, please put "extern"s for them in a header file and not in
several source files. ie:
+++ kern/init_sysctl.c 14 Sep 2009 00:57:25 -0000
+++ kern/vfs_subr.c 14 Sep 2009 00:57:28 -0000
+++ kern/init_main.c 14 Sep 2009 00:57:29 -0000
these files shouldn't need to 'extern' a variable, it should
come from a header file.
thanks.
.mrg.
Home |
Main Index |
Thread Index |
Old Index