* [9fans] fossil option -m
@ 2012-08-18 5:03 arisawa
2012-08-18 5:30 ` erik quanstrom
0 siblings, 1 reply; 22+ messages in thread
From: arisawa @ 2012-08-18 5:03 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Helo,
Plan 9 manual FOSSIL(4) says about fossil/fossil command option -m:
-m Allocate free-memory-percent percent of the avail-
able free RAM for buffers. This overrides all other
memory sizing parameters, notably the -c option to
open.
How to give memory, for example 25%, to fossil in starting 9pcf or 9pccpuf kernel?
I think the value should be enabled to be given in plan9.ini, but I couldn't find in the manual PLAN9.INI(8).
Kenji Arisawa
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 5:03 [9fans] fossil option -m arisawa
@ 2012-08-18 5:30 ` erik quanstrom
2012-08-18 5:40 ` John Floren
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 5:30 UTC (permalink / raw)
To: 9fans
On Sat Aug 18 01:04:53 EDT 2012, arisawa@ar.aichi-u.ac.jp wrote:
> Helo,
>
> Plan 9 manual FOSSIL(4) says about fossil/fossil command option -m:
> -m Allocate free-memory-percent percent of the avail-
> able free RAM for buffers. This overrides all other
> memory sizing parameters, notably the -c option to
> open.
> How to give memory, for example 25%, to fossil in starting 9pcf or 9pccpuf kernel?
> I think the value should be enabled to be given in plan9.ini, but I couldn't find in the manual PLAN9.INI(8).
if you're using standard plan 9 boot stuff, you'll need to hack boot/local.c
right under the /* start fossil */ comment, or fossil itself. personally, i'd lean
toward adding an environment variable which could be put into plan9.ini
and be the equivalent of -m.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 5:30 ` erik quanstrom
@ 2012-08-18 5:40 ` John Floren
2012-08-18 10:04 ` arisawa
2012-08-18 11:12 ` Richard Miller
[not found] ` <CAL4LZyimqPZVQGmTDXzKBJsJNUaLsCEQBZz4qY8YSCb7pMkypA@mail.gmail.c>
2 siblings, 1 reply; 22+ messages in thread
From: John Floren @ 2012-08-18 5:40 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Fri, Aug 17, 2012 at 10:30 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> On Sat Aug 18 01:04:53 EDT 2012, arisawa@ar.aichi-u.ac.jp wrote:
>> Helo,
>>
>> Plan 9 manual FOSSIL(4) says about fossil/fossil command option -m:
>> -m Allocate free-memory-percent percent of the avail-
>> able free RAM for buffers. This overrides all other
>> memory sizing parameters, notably the -c option to
>> open.
>> How to give memory, for example 25%, to fossil in starting 9pcf or 9pccpuf kernel?
>> I think the value should be enabled to be given in plan9.ini, but I couldn't find in the manual PLAN9.INI(8).
>
> if you're using standard plan 9 boot stuff, you'll need to hack boot/local.c
> right under the /* start fossil */ comment, or fossil itself. personally, i'd lean
> toward adding an environment variable which could be put into plan9.ini
> and be the equivalent of -m.
>
> - erik
>
You can also use a boot.fs kernel, so you can define the startup in an
rc script. Very convenient, I used it to set up our
cpu/auth/fileserver to use a Coraid AoE device for Venti.
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 5:40 ` John Floren
@ 2012-08-18 10:04 ` arisawa
2012-08-18 11:14 ` Richard Miller
2012-08-18 14:57 ` erik quanstrom
0 siblings, 2 replies; 22+ messages in thread
From: arisawa @ 2012-08-18 10:04 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Thanks Erik and John,
It seems the option value -m is 20 by default.
/sys/src/9/boot/local.c in Plan9:
run("/boot/fossil", "-m", "20", "-f", partition,
"-c", "srv -A fboot", "-c", "srv -p fscons", nil);
I have looked contents in /boot/bootfs.paq of 9front.
I like the booting process: flexible, elegant and probably powerful.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 5:30 ` erik quanstrom
2012-08-18 5:40 ` John Floren
@ 2012-08-18 11:12 ` Richard Miller
2012-08-18 11:36 ` David du Colombier
[not found] ` <CAL4LZyimqPZVQGmTDXzKBJsJNUaLsCEQBZz4qY8YSCb7pMkypA@mail.gmail.c>
2 siblings, 1 reply; 22+ messages in thread
From: Richard Miller @ 2012-08-18 11:12 UTC (permalink / raw)
To: 9fans
> personally, i'd lean
> toward adding an environment variable which could be put into plan9.ini
> and be the equivalent of -m.
How about
*fossilpercent=NN
*ventipercent=NN
*kfspercent=NN
Any others?
I'll do a patch if nobody objects. Needs a change to kfs to add '-m' option.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 10:04 ` arisawa
@ 2012-08-18 11:14 ` Richard Miller
2012-08-18 14:57 ` erik quanstrom
1 sibling, 0 replies; 22+ messages in thread
From: Richard Miller @ 2012-08-18 11:14 UTC (permalink / raw)
To: 9fans
> I have looked contents in /boot/bootfs.paq of 9front.
> I like the booting process: flexible, elegant and probably powerful.
Using a shell script to control booting has been around for a while:
--rwxrwxr-x M 12 sys sys 568 Feb 3 2005 /sys/lib/sysconfig/blast/boot
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 11:12 ` Richard Miller
@ 2012-08-18 11:36 ` David du Colombier
2012-08-18 13:02 ` Richard Miller
0 siblings, 1 reply; 22+ messages in thread
From: David du Colombier @ 2012-08-18 11:36 UTC (permalink / raw)
To: 9fans
> How about
> *fossilpercent=NN
> *ventipercent=NN
> *kfspercent=NN
> Any others?
>
> I'll do a patch if nobody objects. Needs a change to kfs to add '-m'
> option.
Yes. I think it's a good idea.
But maybe without the leading '*', since they
aren't kernel parameters.
--
David du Colombier
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 11:36 ` David du Colombier
@ 2012-08-18 13:02 ` Richard Miller
2012-08-18 14:53 ` erik quanstrom
0 siblings, 1 reply; 22+ messages in thread
From: Richard Miller @ 2012-08-18 13:02 UTC (permalink / raw)
To: 9fans
> But maybe without the leading '*', since they
> aren't kernel parameters.
Probably right, although it's never been clear to me why some things
have '*' and some don't. For example etherN=XXXXX is used only by
the kernel, but it still gets passed in the normal '#e' environment
to processes.
On further thought, what about generalising a bit more: plan9.ini(8)
already has
factotumopts=options
Causes boot(8) to start factotum with the given options,
If we allowed XXXXopts=options, where XXXX is the name of any command
in /boot, my earlier suggestion would be just a particular case of this
with
fossilopts=-m NN
ventiopts=-m NN
Is this a simplification or a complication?
I'd actually prefer 'fossil-opts=-M NN' , but we already have the
precedent of factotumopts.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 13:02 ` Richard Miller
@ 2012-08-18 14:53 ` erik quanstrom
2012-08-19 9:04 ` David du Colombier
0 siblings, 1 reply; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 14:53 UTC (permalink / raw)
To: 9fans
> Probably right, although it's never been clear to me why some things
> have '*' and some don't. For example etherN=XXXXX is used only by
> the kernel, but it still gets passed in the normal '#e' environment
> to processes.
i'd say that it's a bit of parsimony that we didn't get right.
quite similar in its dog-always-on-wrong-side-of-door nature
to bourne shell's "export".
> How about
> *fossilpercent=NN
> *ventipercent=NN
> *kfspercent=NN
let's make it "fsmb". that way we need not enumerate file servers.
i've always found listing things in mb is easier to work out.
maybe i'm applying bad experiences with percentage-based partitions,
and *kernelpercent incorrectly.
(if i have *kernelpercent=9 or 10 and 3000mb of memory, how much
kernel memory do i get and why? how much memory would i
get if i specified nothing? i think the answer is 73.8125mb any
way for a cpu server, and 256mb for a terminal, using the distribution's
algorithms.)
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 10:04 ` arisawa
2012-08-18 11:14 ` Richard Miller
@ 2012-08-18 14:57 ` erik quanstrom
2012-08-18 16:23 ` cinap_lenrek
1 sibling, 1 reply; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 14:57 UTC (permalink / raw)
To: 9fans
> I have looked contents in /boot/bootfs.paq of 9front.
> I like the booting process: flexible, elegant and probably powerful.
it's another stage of bootloading which requires a number of things to be built-in
to the kernel. in this sense, it's like initrd.
if we were to instead make the local file servers (fossil+venti, kfs, cwfs, etc.)
idiomatic enough in their arguments, it should be easy enough to drive them
with the same boot code, that needn't bloat the kernel, or require fancy
memory reclaim.
also,
> let's make it "fsmb". that way we need not enumerate file servers.
> i've always found listing things in mb is easier to work out.
i take it back. $fsname^mb is idiomatic enough to automate.
sorry for the noise.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
[not found] ` <CAL4LZyimqPZVQGmTDXzKBJsJNUaLsCEQBZz4qY8YSCb7pMkypA@mail.gmail.c>
@ 2012-08-18 15:00 ` erik quanstrom
2012-08-18 15:18 ` erik quanstrom
0 siblings, 1 reply; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 15:00 UTC (permalink / raw)
To: 9fans
> You can also use a boot.fs kernel, so you can define the startup in an
> rc script. Very convenient, I used it to set up our
> cpu/auth/fileserver to use a Coraid AoE device for Venti.
you can do that with the usual scripts with 9atom. it requires setting
"aoeif=<list>" and "aoedev=<list>". see the manual pages.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 15:00 ` erik quanstrom
@ 2012-08-18 15:18 ` erik quanstrom
0 siblings, 0 replies; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 15:18 UTC (permalink / raw)
To: 9fans
> > You can also use a boot.fs kernel, so you can define the startup in an
> > rc script. Very convenient, I used it to set up our
> > cpu/auth/fileserver to use a Coraid AoE device for Venti.
>
> you can do that with the usual scripts with 9atom. it requires setting
> "aoeif=<list>" and "aoedev=<list>". see the manual pages.
s:scripts:boot code:
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 14:57 ` erik quanstrom
@ 2012-08-18 16:23 ` cinap_lenrek
2012-08-18 17:11 ` erik quanstrom
0 siblings, 1 reply; 22+ messages in thread
From: cinap_lenrek @ 2012-08-18 16:23 UTC (permalink / raw)
To: 9fans
term% cat /sys/src/9/port/bootfs.proto
$objtype
bin
9660srv
awk
aux
kbdfs
bind
cat
cfs
cryptsetup
dd
disk
fdisk
kfs
prep
dossrv
echo
cwfs64x
grep
ip
ipconfig
ls
mkdir
mntgen
mount
mv
hjfs
rc
rm
sed
sleep
srv
test
unmount
nusb
usbd
disk
kb
xd
rc
lib
rcmain
local.rc 555 sys sys ../boot/local.rc
net.rc 555 sys sys ../boot/net.rc
bin
fstype
diskparts
nusbrc 555 sys sys ../boot/nusbrc
bootrc 555 sys sys ../boot/bootrc
tmp
the resulting bootfs.paq is 1.2 MB.
theres no reclaim. if init dies you get back to the bootrc
"bootargs" prompt.
for comparsion, drawing a 1024x768x32 rio window would be
like 3MB of precious kernel memory.
making fileservers idiomatic is a good idea. thats exactly
what i did with cwfs making it look like kfs. fossil/venti
is the only filesystem that requires special boot code.
(which does not matter in 9front as fossil was removed).
--
cinap
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 16:23 ` cinap_lenrek
@ 2012-08-18 17:11 ` erik quanstrom
2012-08-18 18:05 ` cinap_lenrek
0 siblings, 1 reply; 22+ messages in thread
From: erik quanstrom @ 2012-08-18 17:11 UTC (permalink / raw)
To: 9fans
> for comparsion, drawing a 1024x768x32 rio window would be
> like 3MB of precious kernel memory.
not an apples-to-apples comparison. devdraw images are
reclaimable and compactable. and does init paqfs exit or not?
that's another 10mb. but memory use is really beside the point.
i think the rc booting travels a conceptually greater distance
between the kernel starting the first process and being fully
functional & configured kernel. this is a cost that for me
outweighs the benefits. and anyway, it's code either way.
the fact that it's rc and not c doesn't change the fact its built
into the kernel.
btw, is there any way to identify programs started from the init paq?
this is an additional 30 odd programs built into the kernel beyond
ipconfig and factotum. (why aren't they part of the init paq?)
and i wonder if there couldn't be some confusion.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 17:11 ` erik quanstrom
@ 2012-08-18 18:05 ` cinap_lenrek
2012-08-18 18:17 ` Richard Miller
0 siblings, 1 reply; 22+ messages in thread
From: cinap_lenrek @ 2012-08-18 18:05 UTC (permalink / raw)
To: 9fans
nope. paqfs doesnt exit. and its not wasting 10mb.
term% ps -a | grep paq
cinap_lenrek 5 0:00 0:00 188K Pread paqfs
yes, bootrc basicly does the same stuff as the c based /boot/boot
did before. we found that the other 30 odd programs can come in handy.
especially when you try to boot a kernel on a odd machines where
theres no working disks (yet :-)).
the odd machines tend to be owned by people new to plan9 and
being short of patience for getting a pxe setup or attach
serial cables to the machine. but asking them to break into rc
and getting some readout of some ctl files works fine.
ipconfig *is* part of bootfs.paq.
term% ls -l /boot
--r-xr-xr-x / 0 cinap_lenrek cinap_lenrek 29306 Aug 16 10:57 /boot/boot
--r-xr-xr-x / 0 cinap_lenrek cinap_lenrek 1327174 Aug 16 10:57 /boot/bootfs.paq
--r-xr-xr-x / 0 cinap_lenrek cinap_lenrek 241755 Aug 16 10:57 /boot/factotum
--r-xr-xr-x / 0 cinap_lenrek cinap_lenrek 72165 Aug 16 10:57 /boot/paqfs
factotum is not build into the paq because libauth's auth_getkeys()
execs "/boot/factotum" to ask for passwords/keys. changing that would
break old binaries.
--
cinap
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 18:05 ` cinap_lenrek
@ 2012-08-18 18:17 ` Richard Miller
0 siblings, 0 replies; 22+ messages in thread
From: Richard Miller @ 2012-08-18 18:17 UTC (permalink / raw)
To: 9fans
> yes, bootrc basicly does the same stuff as the c based /boot/boot
> did before. we found that the other 30 odd programs can come in handy.
> especially when you try to boot a kernel on a odd machines where
> theres no working disks (yet :-)).
Yes, I've found the same approach useful while developing an sd/mmc
card driver for the raspberry pi. I started with this inital boot.rc:
#!/boot/rc -m /boot/rcmain
/boot/echo boot...
/boot/bind -c /boot /bin
bind '#p' /proc
bind '#d' /fd
bind -a '#P' /dev
bind -a '#t' /dev
bind -a '#S' /dev
echo -n rpi >/dev/hostowner
echo fdisk...
fdisk -p /dev/sdM0/data >/dev/sdM0/ctl
cat /dev/sdM0/ctl
dossrv -f/dev/sdM0/dos
mount -c /srv/dos /mnt
exec /boot/rc -m/boot/rcmain -i
And for sd driver testing there's no need for a paqfs - a handful
of useful programs can just be stuck into /boot directly:
bootdir
boot.rc boot
/arm/bin/rc
/rc/lib/rcmain
/arm/bin/mount
/arm/bin/unmount
/arm/bin/bind
/arm/bin/echo
/arm/bin/cat
/arm/bin/cmp
/arm/bin/ls
/arm/bin/ps
/arm/bin/dd
/arm/bin/xd
/arm/bin/rm
/arm/bin/mkdir
/arm/bin/disk/fdisk
/arm/bin/dossrv
But all this is now obsolete [see next message].
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-18 14:53 ` erik quanstrom
@ 2012-08-19 9:04 ` David du Colombier
2012-08-19 15:04 ` erik quanstrom
0 siblings, 1 reply; 22+ messages in thread
From: David du Colombier @ 2012-08-19 9:04 UTC (permalink / raw)
To: 9fans
> let's make it "fsmb". that way we need not enumerate file servers.
Just wondering. How do you distinguish between Fossil
and Venti, when they are running on the same machine?
They have very different memory requirement.
--
David du Colombier
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-19 9:04 ` David du Colombier
@ 2012-08-19 15:04 ` erik quanstrom
2012-08-19 16:06 ` Bakul Shah
0 siblings, 1 reply; 22+ messages in thread
From: erik quanstrom @ 2012-08-19 15:04 UTC (permalink / raw)
To: 9fans
On Sun Aug 19 05:06:03 EDT 2012, 0intro@gmail.com wrote:
> > let's make it "fsmb". that way we need not enumerate file servers.
>
> Just wondering. How do you distinguish between Fossil
> and Venti, when they are running on the same machine?
> They have very different memory requirement.
i retracted this suggestion yesterday. not only for the reason you
point out, but also because if we generalize the kfs, fossil code
to bootlocalfses, $($fsname)mb seems the obvious choice.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-19 15:04 ` erik quanstrom
@ 2012-08-19 16:06 ` Bakul Shah
2012-08-19 16:08 ` cinap_lenrek
2012-08-19 16:17 ` erik quanstrom
0 siblings, 2 replies; 22+ messages in thread
From: Bakul Shah @ 2012-08-19 16:06 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Aug 19, 2012, at 8:04 AM, erik quanstrom <quanstro@quanstro.net> wrote:
> On Sun Aug 19 05:06:03 EDT 2012, 0intro@gmail.com wrote:
>>> let's make it "fsmb". that way we need not enumerate file servers.
>>
>> Just wondering. How do you distinguish between Fossil
>> and Venti, when they are running on the same machine?
>> They have very different memory requirement.
>
> i retracted this suggestion yesterday. not only for the reason you
> point out, but also because if we generalize the kfs, fossil code
> to bootlocalfses, $($fsname)mb seems the obvious choice.
What's mb? Milli bits?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-19 16:06 ` Bakul Shah
@ 2012-08-19 16:08 ` cinap_lenrek
2012-08-19 16:15 ` Richard Miller
2012-08-19 16:17 ` erik quanstrom
1 sibling, 1 reply; 22+ messages in thread
From: cinap_lenrek @ 2012-08-19 16:08 UTC (permalink / raw)
To: 9fans
millerbytes :)
--
cinap
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-19 16:08 ` cinap_lenrek
@ 2012-08-19 16:15 ` Richard Miller
0 siblings, 0 replies; 22+ messages in thread
From: Richard Miller @ 2012-08-19 16:15 UTC (permalink / raw)
To: 9fans
> millerbytes :)
No, he only barks occasionally.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [9fans] fossil option -m
2012-08-19 16:06 ` Bakul Shah
2012-08-19 16:08 ` cinap_lenrek
@ 2012-08-19 16:17 ` erik quanstrom
1 sibling, 0 replies; 22+ messages in thread
From: erik quanstrom @ 2012-08-19 16:17 UTC (permalink / raw)
To: 9fans
>
> What's mb? Milli bits?
micro baud.
- erik
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2012-08-19 16:17 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-18 5:03 [9fans] fossil option -m arisawa
2012-08-18 5:30 ` erik quanstrom
2012-08-18 5:40 ` John Floren
2012-08-18 10:04 ` arisawa
2012-08-18 11:14 ` Richard Miller
2012-08-18 14:57 ` erik quanstrom
2012-08-18 16:23 ` cinap_lenrek
2012-08-18 17:11 ` erik quanstrom
2012-08-18 18:05 ` cinap_lenrek
2012-08-18 18:17 ` Richard Miller
2012-08-18 11:12 ` Richard Miller
2012-08-18 11:36 ` David du Colombier
2012-08-18 13:02 ` Richard Miller
2012-08-18 14:53 ` erik quanstrom
2012-08-19 9:04 ` David du Colombier
2012-08-19 15:04 ` erik quanstrom
2012-08-19 16:06 ` Bakul Shah
2012-08-19 16:08 ` cinap_lenrek
2012-08-19 16:15 ` Richard Miller
2012-08-19 16:17 ` erik quanstrom
[not found] ` <CAL4LZyimqPZVQGmTDXzKBJsJNUaLsCEQBZz4qY8YSCb7pMkypA@mail.gmail.c>
2012-08-18 15:00 ` erik quanstrom
2012-08-18 15:18 ` erik quanstrom
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).