From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <35f361459403c30512191d203286cd76@swcp.com> References: <35f361459403c30512191d203286cd76@swcp.com> Date: Thu, 26 May 2011 10:26:08 -0400 Message-ID: From: "Devon H. O'Dell" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] 9vx patches [was: 9vx bootimage build instructions?] Topicbox-Message-UUID: e932d976-ead6-11e9-9d60-3106f5b1d025 2011/5/26 EBo : > On Thu, 26 May 2011 09:40:31 +0200, yy wrote: >> >> 2011/5/26 erik quanstrom : >>> >>> 9vx uses plan9.ini? =A0last i checked, that assumption was false. >> >> That depends where you checked. Ron's version (or mine, they are the >> same now) has some support for plan9.ini files with the -f flag, as is >> documented in the man page: >> http://bytebucket.org/yiyus/vx32/wiki/9vx.html. However, although >> plan9.ini is used to set some config values (as the root file system >> or the memory limit mentioned in this thread), 9vx cannot load a >> kernel file. So: > > There was a minor inconsistency. =A0There is a comment in 9vx/mmu.c which > states that memsize can be overwritten with the '-m' option, but no -m > switch was provided in main. =A0The following diff adds that (tested): Yeah, I added this option years ago but it must have been lost in some of the SoC work plus merges at some point. > --- main.c =A0 =A0 =A02011-05-26 08:34:02.687051389 -0500 > +++ main.c =A0 =A0 =A02011-05-26 08:34:10.830709411 -0500 > @@ -170,6 +170,9 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0username =3D EARGF(usage()); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > > + =A0 =A0 =A0 case 'm': > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memsize =3D atoi(EARGF(usage())); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > =A0 =A0 =A0 =A0default: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage(); > =A0 =A0 =A0 =A0}ARGEND > > Also, thanks for the pointer. =A0Setting memsize in a plan9.ini also work= s. Or maybe yiyus added it here in an attempt to get things out of CLI opts when the plan9.ini stuff happened. >>> i think you need to modify the 9vx kernel directly. >> >> is right. >> >> Modifying the 9vx kernel is not funny because of the bad state of the >> .ed files in a/. I hope newer versions of gcc with plan9 extensions >> make most of these scripts unnecessary, but as far as I know nobody >> has tried. > > The following command line switch (-n) adds an initial hack to conf.nproc= to > override the 2000 hard coded limit. =A0While this allws me to now run ove= r 64 > threads, running it to high gives me a warning that there are to many pro= cs > for devproc. =A0I'm providing the patch here as is, but will likely take = a > poke at it again over the weekend. =A0As a note, I need to be able to spa= wn > over 3000 procs to stress test some code. =A0I would like to get this wor= king > under 9vx as well... > > --- main.c =A0 =A0 =A02011-05-26 08:40:00.286043255 -0500 > +++ main.c =A0 =A0 =A02011-05-26 08:43:42.369712636 -0500 > @@ -64,6 +64,8 @@ > > =A0static char* =A0 getuser(void); > > +int nproclimit =3D 2000; // allow override of the hardlimit set to the n= umber > of procs > + > =A0void > =A0usage(void) > =A0{ > @@ -173,6 +175,9 @@ > =A0 =A0 =A0 =A0case 'm': > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0memsize =3D atoi(EARGF(usage())); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > + =A0 =A0 =A0 case 'n': > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 nproclimit =3D atoi(EARGF(usage())); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > =A0 =A0 =A0 =A0default: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage(); > =A0 =A0 =A0 =A0}ARGEND > @@ -284,8 +289,8 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conf.npage +=3D conf.mem[i].npage; > =A0 =A0 =A0 =A0conf.upages =3D conf.npage; > =A0 =A0 =A0 =A0conf.nproc =3D 100 + ((conf.npage*BY2PG)/MB)*5; > - =A0 =A0 =A0 if(conf.nproc > 2000) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 conf.nproc =3D 2000; > + =A0 =A0 =A0 if(conf.nproc > nproclimit) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 conf.nproc =3D nproclimit; > =A0 =A0 =A0 =A0conf.nimage =3D 200; > =A0 =A0 =A0 =A0conf.nswap =3D 0; > =A0 =A0 =A0 =A0conf.nswppo =3D 0; > > I do not think I have write access to your 9vx repository, and I do not k= now > if you want the nproc limit hack. =A0Let me know if you find these accept= able. Typically the way to do this is to create your own public fork, and then send a pull request to the maintainer of whoever you forked from since hg has the distributed model. > =A0EBo -- > > >