[Libsysio-commit] HEAD: libsysio/src inode.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2008-12-12 22:28:22
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13919/src Modified Files: inode.c Log Message: Removed inode reclaim functionality. This is handled, now, by the base node reclamation; It kills idle inodes. Also, set the minimum reclaim for base nodes to 511 or 1/4 or NAMES_TABLE_LEN, whichever is smaller. Index: inode.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/inode.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -w -b -B -p -r1.48 -r1.49 --- inode.c 6 Dec 2008 23:28:19 -0000 1.48 +++ inode.c 12 Dec 2008 22:28:15 -0000 1.49 @@ -70,7 +71,10 @@ /* * Desired high-water mark. */ -#define P_RECLAIM_MIN 16 +#define P_RECLAIM_MIN 511 +#if P_RECLAIM_MIN > (NAMES_TABLE_LEN / 4) +#define P_RECLAIM_MIN (NAMES_TABLE_LEN / 4) +#endif /* * Active i-nodes in the system and the number of same. @@ -101,9 +105,11 @@ struct pnode *_sysio_root = NULL; static struct { unsigned long long cst_iprobes; unsigned long long cst_ihits; +#if 0 unsigned long long cst_ireclaims; unsigned long long cst_iexamined; unsigned long long cst_idismissed; +#endif unsigned long long cst_pbprobes; unsigned long long cst_pbhits; unsigned long long cst_preclaims; @@ -116,9 +122,11 @@ ino_cstats_init() { cstats.cst_iprobes = cstats.cst_ihits = 0; +#if 0 cstats.cst_ireclaims = cstats.cst_iexamined = cstats.cst_idismissed = 0; +#endif cstats.cst_pbprobes = cstats.cst_pbhits = 0; cstats.cst_preclaims = cstats.cst_pexamined = @@ -153,6 +161,7 @@ _sysio_i_init() return 0; } +#if 0 /* * Garbage-collect idle i-nodes. */ @@ -177,6 +186,7 @@ i_reclaim() break; } } +#endif /* * Compare two file identifiers, returning -1 if length of first is @@ -263,6 +273,7 @@ _sysio_i_new(struct filesys *fs, struct inode *ino; struct inode_ops operations; +#if 0 if (n_inodes > n_names) { /* * This has become pretty badly skewed relative to @@ -271,6 +282,7 @@ _sysio_i_new(struct filesys *fs, */ i_reclaim(); } +#endif ino = malloc(sizeof(struct inode)); if (!ino) @@ -639,10 +651,12 @@ _sysio_i_shutdown() _sysio_cprintf("inode: probe %llu, hit %llu\n", cstats.cst_iprobes, cstats.cst_ihits); +#if 0 _sysio_cprintf("inode: reclaims %llu, examined %llu dismissed %llu\n", cstats.cst_ireclaims, cstats.cst_iexamined, cstats.cst_idismissed); +#endif _sysio_cprintf("pbnode: probe %llu, hit %llu\n", cstats.cst_pbprobes, cstats.cst_pbhits); |