9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Devon H. O'Dell" <devon.odell@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9vx patches [was: 9vx bootimage build instructions?]
Date: Thu, 26 May 2011 10:26:08 -0400	[thread overview]
Message-ID: <BANLkTikvqeKg-MB431qJi=NZZjr-fkpPTA@mail.gmail.com> (raw)
In-Reply-To: <35f361459403c30512191d203286cd76@swcp.com>

2011/5/26 EBo <ebo@sandien.com>:
> On Thu, 26 May 2011 09:40:31 +0200, yy wrote:
>>
>> 2011/5/26 erik quanstrom <quanstro@quanstro.net>:
>>>
>>> 9vx uses plan9.ini?  last 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.  There 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.  The 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      2011-05-26 08:34:02.687051389 -0500
> +++ main.c      2011-05-26 08:34:10.830709411 -0500
> @@ -170,6 +170,9 @@
>                username = EARGF(usage());
>                break;
>
> +       case 'm':
> +               memsize = atoi(EARGF(usage()));
> +               break;
>        default:
>                usage();
>        }ARGEND
>
> Also, thanks for the pointer.  Setting memsize in a plan9.ini also works.

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.  While this allws me to now run over 64
> threads, running it to high gives me a warning that there are to many procs
> for devproc.  I'm providing the patch here as is, but will likely take a
> poke at it again over the weekend.  As a note, I need to be able to spawn
> over 3000 procs to stress test some code.  I would like to get this working
> under 9vx as well...
>
> --- main.c      2011-05-26 08:40:00.286043255 -0500
> +++ main.c      2011-05-26 08:43:42.369712636 -0500
> @@ -64,6 +64,8 @@
>
>  static char*   getuser(void);
>
> +int nproclimit = 2000; // allow override of the hardlimit set to the number
> of procs
> +
>  void
>  usage(void)
>  {
> @@ -173,6 +175,9 @@
>        case 'm':
>                memsize = atoi(EARGF(usage()));
>                break;
> +       case 'n':
> +               nproclimit = atoi(EARGF(usage()));
> +               break;
>        default:
>                usage();
>        }ARGEND
> @@ -284,8 +289,8 @@
>                conf.npage += conf.mem[i].npage;
>        conf.upages = conf.npage;
>        conf.nproc = 100 + ((conf.npage*BY2PG)/MB)*5;
> -       if(conf.nproc > 2000)
> -               conf.nproc = 2000;
> +       if(conf.nproc > nproclimit)
> +               conf.nproc = nproclimit;
>        conf.nimage = 200;
>        conf.nswap = 0;
>        conf.nswppo = 0;
>
> I do not think I have write access to your 9vx repository, and I do not know
> if you want the nproc limit hack.  Let me know if you find these acceptable.

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.

>  EBo --
>
>
>



  reply	other threads:[~2011-05-26 14:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  3:27 [9fans] 9vx bootimage build instructions? EBo
2011-05-26  3:37 ` erik quanstrom
2011-05-26  3:58   ` EBo
2011-05-26  4:05     ` EBo
2011-05-26  4:18       ` Devon H. O'Dell
2011-05-26  4:24       ` Bakul Shah
2011-05-26  7:40   ` yy
2011-05-26 14:06     ` [9fans] 9vx patches [was: 9vx bootimage build instructions?] EBo
2011-05-26 14:26       ` Devon H. O'Dell [this message]
2011-05-26 16:39         ` [9fans] hgfs? Bakul Shah
2011-05-26 22:12           ` simon softnet
2011-05-26 23:24           ` Iruatã Souza
2011-05-27  0:16             ` erik quanstrom
2011-05-27  8:12               ` Bakul Shah
2011-05-27 12:21                 ` erik quanstrom
2011-05-27 14:45                   ` Lucio De Re
2011-05-27 17:18                   ` Bakul Shah
2011-05-27 17:30                     ` erik quanstrom
2011-05-26 15:34       ` [9fans] 9vx patches [was: 9vx bootimage build instructions?] erik quanstrom
2011-05-26 18:17         ` EBo
2011-05-26 18:58           ` erik quanstrom
2011-05-26 19:17             ` EBo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTikvqeKg-MB431qJi=NZZjr-fkpPTA@mail.gmail.com' \
    --to=devon.odell@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).