Date: Thu, 27 Jul 2006 07:05:29 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102528 for review Message-ID: <200607270705.k6R75Tld038253@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102528 Change 102528 by cdjones@cdjones-impulse on 2006/07/27 07:04:48 Branch conf to add kernel option for SCHED_HIER. Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.alpha#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.amd64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.arm#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.i386#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.ia64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.pc98#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.powerpc#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/Makefile.sparc64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/NOTES#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/defines#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.alpha#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.amd64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.arm#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.i386#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.ia64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.pc98#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.powerpc#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/files.sparc64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/kern.mk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/kern.post.mk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/kern.pre.mk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/kmod.mk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/kmod_syms.awk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.alpha#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.amd64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.arm#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.i386#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.ia64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.powerpc#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/ldscript.sparc64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/makeLINT.mk#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/makeLINT.sed#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/newvers.sh#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.alpha#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.amd64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.arm#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.i386#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.ia64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.pc98#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.powerpc#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/options.sparc64#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/conf/systags.sh#1 branch .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_fork.c#5 edit .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_jail.c#11 edit .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#6 edit .. //depot/projects/soc2006/cdjones_jail/src/sys/vm/vm_pageout.c#2 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_fork.c#5 (text+ko) ==== ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/kern_jail.c#11 (text+ko) ==== @@ -116,6 +116,24 @@ kthread_exit(0); } +static void +jpager_td(void *arg) +{ + struct prison *pr; + pr = arg; + + for (;;) { + if (pr->pr_pager_flags & J_PAGER_TD_DIE) + break; + + /* TODO --- make interval into a sysctl? */ + tsleep(pr, 0, "-", hz); + } + + pr->pr_pager_flags = J_PAGER_TD_DEAD; + kthread_exit(0); +} + /* * MPSAFE * @@ -192,6 +210,11 @@ goto e_dropprref; KASSERT(j_sched_proc != NULL, ("NULL j_sched_proc")); pr->pr_scheduler = j_sched_proc; + pr->pr_pager_flags = J_PAGER_TD_ACTIVE; + if (kthread_create(jpager_td, pr, (void *) j_pager_proc, 0, 0, "jpager %d", pr->pr_id)) + goto e_dropprref; + KASSERT(j_pager_proc != NULL, ("NULL j_pager_proc")); + pr->pr_pager = j_pager_proc; /* TODO #endif */ error = jail_attach(td, &jaa); ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#6 (text+ko) ==== ==== //depot/projects/soc2006/cdjones_jail/src/sys/vm/vm_pageout.c#2 (text+ko) ====
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607270705.k6R75Tld038253>