~kris/9p

9hist

eeff7096b89ebae832bff8f5d0fc8a436b4802a7 — David du Colombier 23 years ago adad83c
Plan 9 from Bell Labs 2003-03-19
1 files changed, 5 insertions(+), 0 deletions(-)

M port/proc.c
M port/proc.c => port/proc.c +5 -0
@@ 334,6 334,9 @@ rebalance(void)
			continue;
		if(p->priority == p->basepri)
			continue;

		/* this comparison is too arbitrary - need a better one */
		/* presotto */
		if(m->ticks - p->readytime < quanta[p->priority]/4)
			continue;
		splhi();


@@ 362,6 365,8 @@ runproc(void)
	if ((p = edf->edfrunproc()) != nil)
		return p;

	/* 10 is completely arbitrary - it interacts with the comparison in rebalance */
	/* presotto */
	if(m->fairness++ == 10){
		m->fairness = 0;
		rebalance();