From f369157d957f29b27aee481ea617501c3d80d779 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 28 May 2013 19:29:08 +0000 Subject: [PATCH] pfs, vfs: increase various limits . pipes in pfs . vnodes in vfs . thread stack sizes in vfs Change-Id: Ib27dedd42f57a90821a5b950cd7ea25cb2b42f3f --- servers/pfs/const.h | 2 +- servers/pfs/glo.h | 2 +- servers/pfs/inode.c | 4 ++-- servers/pfs/inode.h | 2 +- servers/pfs/main.c | 2 +- servers/pfs/super.c | 4 ++-- servers/vfs/const.h | 4 ++-- servers/vfs/worker.c | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/servers/pfs/const.h b/servers/pfs/const.h index f89a239be..edc8e989f 100644 --- a/servers/pfs/const.h +++ b/servers/pfs/const.h @@ -1,7 +1,7 @@ #ifndef __PFS_CONST_H__ #define __PFS_CONST_H__ -#define NR_INODES 256 /* # slots in "in core" inode table */ +#define PFS_NR_INODES 512 /* # slots in "in core" inode table */ /* Size of descriptor table for unix domain sockets. This should be * equal to the maximum number of minor devices (currently 256). diff --git a/servers/pfs/glo.h b/servers/pfs/glo.h index c39a7581f..fd0db9075 100644 --- a/servers/pfs/glo.h +++ b/servers/pfs/glo.h @@ -24,6 +24,6 @@ EXTERN int busy; EXTERN int unmountdone; /* Inode map. */ -EXTERN bitchunk_t inodemap[FS_BITMAP_CHUNKS(NR_INODES)]; +EXTERN bitchunk_t inodemap[FS_BITMAP_CHUNKS(PFS_NR_INODES)]; #endif diff --git a/servers/pfs/inode.c b/servers/pfs/inode.c index 333d56567..b6a508649 100644 --- a/servers/pfs/inode.c +++ b/servers/pfs/inode.c @@ -81,7 +81,7 @@ void init_inode_cache() LIST_INIT(rlp); /* add free inodes to unused/free list */ - for (rip = &inode[0]; rip < &inode[NR_INODES]; ++rip) { + for (rip = &inode[0]; rip < &inode[PFS_NR_INODES]; ++rip) { rip->i_num = NO_ENTRY; TAILQ_INSERT_HEAD(&unused_inodes, rip, i_unused); } @@ -309,7 +309,7 @@ struct inode *rip; bit_t b; - if (rip->i_num <= (ino_t) 0 || rip->i_num >= (ino_t) NR_INODES) return; + if (rip->i_num <= (ino_t) 0 || rip->i_num >= (ino_t) PFS_NR_INODES) return; b = (bit_t) rip->i_num; free_bit(b); } diff --git a/servers/pfs/inode.h b/servers/pfs/inode.h index 19e582593..897ba7aca 100644 --- a/servers/pfs/inode.h +++ b/servers/pfs/inode.h @@ -27,7 +27,7 @@ EXTERN struct inode { TAILQ_ENTRY(inode) i_unused; /* free and unused list */ -} inode[NR_INODES]; +} inode[PFS_NR_INODES]; /* list of unused/free inodes */ EXTERN TAILQ_HEAD(unused_inodes_t, inode) unused_inodes; diff --git a/servers/pfs/main.c b/servers/pfs/main.c index 7d8d71e0b..f88fe0cb2 100644 --- a/servers/pfs/main.c +++ b/servers/pfs/main.c @@ -128,7 +128,7 @@ static int sef_cb_init_fresh(int type, sef_init_info_t *info) busy = 0; /* Server is not 'busy' (i.e., inodes in use). */ /* Init inode table */ - for (i = 0; i < NR_INODES; ++i) { + for (i = 0; i < PFS_NR_INODES; ++i) { inode[i].i_count = 0; } diff --git a/servers/pfs/super.c b/servers/pfs/super.c index 958fa2a6b..dc022946d 100644 --- a/servers/pfs/super.c +++ b/servers/pfs/super.c @@ -24,7 +24,7 @@ bit_t alloc_bit(void) bit_t b; unsigned int i, bcount; - bcount = FS_BITMAP_CHUNKS(NR_INODES); /* Inode map has this many chunks. */ + bcount = FS_BITMAP_CHUNKS(PFS_NR_INODES); /* Inode map has this many chunks. */ wlim = &inodemap[bcount]; /* Point to last chunk in inodemap. */ for (wptr = &inodemap[0]; wptr < wlim; wptr++) { @@ -38,7 +38,7 @@ bit_t alloc_bit(void) b = (bit_t) ((wptr - &inodemap[0]) * FS_BITCHUNK_BITS + i); /* Don't allocate bits beyond end of map. */ - if (b >= NR_INODES) break; + if (b >= PFS_NR_INODES) break; /* Allocate and return bit number. */ *wptr |= 1 << i; diff --git a/servers/vfs/const.h b/servers/vfs/const.h index 6c2ff41cd..7262aee70 100644 --- a/servers/vfs/const.h +++ b/servers/vfs/const.h @@ -2,10 +2,10 @@ #define __VFS_CONST_H__ /* Tables sizes */ -#define NR_FILPS 512 /* # slots in filp table */ +#define NR_FILPS 1024 /* # slots in filp table */ #define NR_LOCKS 8 /* # slots in the file locking table */ #define NR_MNTS 16 /* # slots in mount table */ -#define NR_VNODES 512 /* # slots in vnode table */ +#define NR_VNODES 1024 /* # slots in vnode table */ #define NR_WTHREADS 8 /* # slots in worker thread table */ #define NR_NONEDEVS NR_MNTS /* # slots in nonedev bitmap */ diff --git a/servers/vfs/worker.c b/servers/vfs/worker.c index add1d3712..8b9f20f27 100644 --- a/servers/vfs/worker.c +++ b/servers/vfs/worker.c @@ -16,9 +16,9 @@ static int init = 0; static mthread_attr_t tattr; #ifdef MKCOVERAGE -# define TH_STACKSIZE (10 * 1024) +# define TH_STACKSIZE (40 * 1024) #else -# define TH_STACKSIZE (7 * 1024) +# define TH_STACKSIZE (28 * 1024) #endif #define ASSERTW(w) assert((w) == &sys_worker || (w) == &dl_worker || \ -- 2.44.0