From: Ben Gras Date: Thu, 11 Dec 2008 14:21:47 +0000 (+0000) Subject: . VM needs a higher priority than VFS, PM etc X-Git-Tag: v3.1.4~205 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/cppcheck-error.log?a=commitdiff_plain;h=b61687fb1b219084a3e0474b5e26701ce5cb6970;p=minix.git . VM needs a higher priority than VFS, PM etc . introduce FULLVM flag: MEMORY and the initial MFS get their own full address spaces, making their stacks and heaps not preallocated (well, freed after VM has initialized it) and letting them allocate more dynamically. MEMORY in particular needs this to map in physical memory using its own page table, without having to allocate. --- diff --git a/kernel/table.c b/kernel/table.c index 594370af5..588bb6593 100755 --- a/kernel/table.c +++ b/kernel/table.c @@ -49,6 +49,7 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)]; #define TSK_F (SYS_PROC) /* kernel tasks */ #define SRV_F (SYS_PROC | PREEMPTIBLE) /* system services */ #define USR_F (BILLABLE | PREEMPTIBLE) /* user processes */ +#define SVM_F (SRV_F | PROC_FULLVM) /* servers with VM */ /* Define system call traps for the various process types. These call masks * determine what system call traps a process is allowed to make. @@ -116,15 +117,15 @@ PUBLIC struct boot_image image[] = { {CLOCK,clock_task,TSK_F, 8, TASK_Q, TSK_S, TSK_T, 0, no_c,"clock" }, {SYSTEM, sys_task,TSK_F, 8, TASK_Q, TSK_S, TSK_T, 0, no_c,"system"}, {HARDWARE, 0,TSK_F, 8, TASK_Q, HRD_S, 0, 0, no_c,"kernel"}, -{PM_PROC_NR, 0,SRV_F, 32, 3, 0, SRV_T, SRV_M, c(pm_c),"pm" }, -{FS_PROC_NR, 0,SRV_F, 32, 4, 0, SRV_T, SRV_M, c(fs_c),"vfs" }, -{RS_PROC_NR, 0,SRV_F, 4, 3, 0, SRV_T, SYS_M, c(rs_c),"rs" }, -{DS_PROC_NR, 0,SRV_F, 4, 3, 0, SRV_T, SYS_M, c(ds_c),"ds" }, +{PM_PROC_NR, 0,SRV_F, 32, 4, 0, SRV_T, SRV_M, c(pm_c),"pm" }, +{FS_PROC_NR, 0,SRV_F, 32, 5, 0, SRV_T, SRV_M, c(fs_c),"vfs" }, +{RS_PROC_NR, 0,SRV_F, 4, 4, 0, SRV_T, SYS_M, c(rs_c),"rs" }, +{DS_PROC_NR, 0,SRV_F, 4, 4, 0, SRV_T, SYS_M, c(ds_c),"ds" }, {TTY_PROC_NR, 0,SRV_F, 4, 1, 0, SRV_T, SYS_M,c(tty_c),"tty" }, -{MEM_PROC_NR, 0,SRV_F, 4, 2, 0, SRV_T, SYS_M,c(mem_c),"memory"}, +{MEM_PROC_NR, 0,SVM_F, 4, 3, 0, SRV_T, SYS_M,c(mem_c),"memory"}, {LOG_PROC_NR, 0,SRV_F, 4, 2, 0, SRV_T, SYS_M,c(drv_c),"log" }, -{MFS_PROC_NR, 0,SRV_F, 32, 4, 0, SRV_T, SRV_M, c(fs_c),"mfs" }, -{VM_PROC_NR, 0,SRV_F, 32, 3, 0, SRV_T, SRV_M, c(vm_c),"vm" }, +{MFS_PROC_NR, 0,SVM_F, 32, 5, 0, SRV_T, SRV_M, c(fs_c),"mfs" }, +{VM_PROC_NR, 0,SRV_F, 32, 2, 0, SRV_T, SRV_M, c(vm_c),"vm" }, {INIT_PROC_NR, 0,USR_F, 8, USER_Q, 0, USR_T, USR_M, no_c,"init" }, };