Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2007/0415/1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/sys/src/9/port/devcons.c /sys/src/9/port/proc.c
% cat >/sys/lib/dist/changes/1176660006.0.txt << EOF
Remove ``cruft'' relating to cooperative scheduling. This turned out to be a win,
so we shouldn't keep it as an `optional' type thing. For more information on 
how cooperative scheduling works in Plan 9, see also:

http://lists.cse.psu.edu/archives/9fans/2007-April/052468.html
http://lists.cse.psu.edu/archives/9fans/2007-April/052472.html
EOF
 [rsc] --rw-rw-r-- M 40 glenda sys 22943 Apr 15 13:32 sys/src/9/port/devcons.c
	/n/sourcesdump/2007/0415/plan9/sys/src/9/port/devcons.c:58,64 - 
	/n/sourcesdump/2007/0416/plan9/sys/src/9/port/devcons.c:58,63
	  	CMhalt,
	  	CMreboot,
	  	CMpanic,
	- 	CMcoop,					/* RSC */
	  };
	  
	  Cmdtab rebootmsg[] =
	/n/sourcesdump/2007/0415/plan9/sys/src/9/port/devcons.c:66,72 - 
	/n/sourcesdump/2007/0416/plan9/sys/src/9/port/devcons.c:65,70
	  	CMhalt,		"halt",		1,
	  	CMreboot,	"reboot",	0,
	  	CMpanic,	"panic",	0,
	- 	CMcoop,		"coop",		0,	/* RSC */
	  };
	  
	  void
	/n/sourcesdump/2007/0415/plan9/sys/src/9/port/devcons.c:1050,1060 - 
	/n/sourcesdump/2007/0416/plan9/sys/src/9/port/devcons.c:1048,1053
	  		case CMpanic:
	  			*(ulong*)0=0;
	  			panic("/dev/reboot");
	- 		case CMcoop: /* RSC */
	- 			{extern int coopsched; coopsched = !coopsched;
	- 			print("coopsched %d\n", coopsched);
	- 			}
	- 			break;
	  		}
	  		poperror();
	  		free(cb);
 [rsc] --rw-rw-r-- M 40 glenda sys 28742 Apr 15 13:32 sys/src/9/port/proc.c
	/n/sourcesdump/2007/0415/plan9/sys/src/9/port/proc.c:7,13 - 
	/n/sourcesdump/2007/0416/plan9/sys/src/9/port/proc.c:7,12
	  #include	"edf.h"
	  #include	<trace.h>
	  
	- int	coopsched;
	  int	schedgain = 30;	/* units in seconds */
	  int	nrdy;
	  Ref	noteidalloc;
	/n/sourcesdump/2007/0415/plan9/sys/src/9/port/proc.c:504,510 - 
	/n/sourcesdump/2007/0416/plan9/sys/src/9/port/proc.c:503,509
	  	start = perfticks();
	  
	  	/* cooperative scheduling until the clock ticks */
	- 	if(coopsched && (p=m->readied) && p->mach==0 && p->state==Ready
	+ 	if((p=m->readied) && p->mach==0 && p->state==Ready
	  	&& runq[Nrq-1].head == nil && runq[Nrq-2].head == nil){
	  		skipscheds++;
	  		rq = &runq[p->priority];


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].