Re: [9fans] inferno runs on n770 and n800/n810 (was: Re: How can I boot plan9 on my Compaq AlphaServer DS10L?)

2008-12-19 Thread Robert Raschke
Hi,

On Thu, Dec 18, 2008 at 9:37 PM,  fge...@gmail.com wrote:
 On Thu, Dec 18, 2008 at 10:21 PM, Anthony Sorace ano...@gmail.com wrote:
 i like nokia's line, and would love to see a port of Plan 9 (or
 Inferno) to the 770 or N800 (there's an even newer one, but i forget
 the model off hand and don't own one of those).

 Inferno works perfectly on the n770 and probably on the n800, n810 as
 well. It's not packaged and doesn't have full-screen mode, but it's
 quite simple to get it running, though i could not find any use for
 it. The binary is in caerwyn's inferno emulator collection at
 http://code.google.com/p/inferno-bin/
 and you can probably easily build it yoursef from the current distribution.


I use my N810 as a portable (fun) development machine, I installed all
the guff like gcc etc. And with that in place it took me an afternoon
to download inferno and compile it up. This is on the N810 itself, not
some hosted dev environment. The emu commandline works very well. I've
not yet tried running wm, that's coming over the holidays. But just to
have mk on the machine is a boon. My brain is too small for gmake.

Having a native Plan 9 on it may be interesting, but probably a lot of
work to get it to not empty the battery in 30 minutes. One thing to be
said about the Maemo platform is that it is pretty good in terms of
power consumption.

Robby



Re: [9fans] inferno runs on n770 and n800/n810 (was: Re: How can I boot plan9 on my Compaq AlphaServer DS10L?)

2008-12-19 Thread Sergey Zhilkin
Hello !

And how about JIT ??


2008/12/19 fge...@gmail.com

 On Thu, Dec 18, 2008 at 10:21 PM, Anthony Sorace ano...@gmail.com wrote:
  i like nokia's line, and would love to see a port of Plan 9 (or
  Inferno) to the 770 or N800 (there's an even newer one, but i forget
  the model off hand and don't own one of those).

 Inferno works perfectly on the n770 and probably on the n800, n810 as
 well. It's not packaged and doesn't have full-screen mode, but it's
 quite simple to get it running, though i could not find any use for
 it. The binary is in caerwyn's inferno emulator collection at
 http://code.google.com/p/inferno-bin/
 and you can probably easily build it yoursef from the current distribution.




-- 
С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey


Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread erik quanstrom
 The places that DMAPPEND is used most commonly are log files and mail
 boxes.

mailboxes are append only, however
deleting a message requires rewriting
the mailbox, which isn't possible.  so
a temporary mbox is written, has its
mode tweaked and then replaces the
mbox.  L.mbox is exclusive open and
locks the whole directory to prevent
accidents.

since each message is in its own file,
mdir uses atomic create(2) (OEXCL)
for delivery.  deleting is trivial.  no
L.mbox required.

back to the subject.  i agree with the
point mixing append-only and regular
fids would be a disaster.  this is because
(in general) it takes multiple writes to
accomplish one's goal.  in the case of
a mailbox, it would not be safe to be
adding a new message while rewriting
to delete messages.  an exclusive-open
file would make much more sense.

log files are the big exception, of
course, nobody cares if the entries
are reordered, as long as they remain
intact.  and since each entry is smaller
than the iounit (syslog uses a 1k
buffer), the can fit into a single write
and can be ordered.

- erik



Re: [9fans] Help with device and clone?

2008-12-19 Thread Devon H. O'Dell
Meh, I keep forgetting to hit reply-all or something.

2008/12/19 erik quanstrom quans...@quanstro.net:
 That's where I was looking initially -- it looks like that's all only
 done when you're connecting to a venti, and it seems like it
 definitely happens after the links run anyway. Links happen after
 initseg(); that stuff happens in bootinit() in Plan 9 proper -- so
 that's where I did it in 9vx. I'm tempted to just use '#l' in
 ip/chandial.c right now until I have a more concrete idea about where
 binds *should* happen. There are still issues with etherve that I need
 to hammer out, I think.

 --dho

 sorry.  i haven't really been following along.  i am confused
 by the fact you're having troubles.  if you're doing things in
 the same order as the native kernel, i don't see how you
 could be getting different results.  unless there is some hack
 in 9vx that causes things to happen differently.

There seem to be some differences in how things happen at start-up
time, but they don't seem so severe. That's why I'm asking here :)

 (you're virtual ether0 is working now, right?)

It works if I force chandial to look for it in '#l', and by works, I
mean I haven't been able to test it on a live network yet :(

--dho

 - erik




Re: [9fans] Help with device and clone?

2008-12-19 Thread erik quanstrom
i did get the original.

- erik



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread Anthony Sorace
 client by definition knows more than the server.

i assume you mean knows less? the server knows where EOF is and
which files to enforce append-only on. your #1 seems to only exist
because the client doesn't have that info.



Re: [9fans] how to install python?

2008-12-19 Thread Juan M. Mendez
2008/12/18 Rudolf Sykora rudolf.syk...@gmail.com:
 Hello,

 please, what's the easiest way to install python on plan9?
 I found python.tgz under fgb. Is that the right way to go?

 Thanks
 Ruda

Hi Rudolf,

Perl and python are in the /n/sources/extra directories of sources.
This are my notes of how I installed perl for plan9, for python is the
same, but you get the idea.


In your plan9:

9fs sources; ls -l /n/sources/extra

--rw-rw-r-- M 23 rsc   sys 14261804 Nov 25  2002 perl.iso.bz2
--rw-rw-r-- M 23 rsc   sys  9404968 Sep 15  2003 pgw.tar.bz2
--rw-rw-r-- M 23 sys   sys 2813 Oct 23 03:04 plan9.tar.bz2
--rw-rw-r-- M 23 rsc   sys47744 Sep 14  2005 postmark.c
--rw-rw-r-- M 23 rsc   sys40841 May  1  2002 pq.tgz
--rwxrwxr-x M 23 rsc   sys  640 Nov  3  2004 ps2txt
--rw-rw-r-- M 23 rsc   sys  4964315 Nov 16  2002 python.iso.bz2

To install it, I did the following:

1. Mount the iso.

 mount /srv/9660 /n/dist /path/to/perl.iso

2. Copy the files to another directory, because they were read only
and I had to modify some files

dircp /n/dist  /usr/glenda/perl/dist

3. Since I couldn't execute perl.setup, because they make references
to non existing files and directories. Do

/n/dist/replica/client/perl.db
/n/dist/replica/client/perl.log

4. Also modify /usr/glenda/perl/dist/perl

To look like this:
--
#!/bin/rc

s=/usr/glenda/perl/dist
serverroot=$s
serverlog=$s/perl.log
serverproto=$s/perl.proto
fn servermount { status='' }
fn serverupdate { status='' }

#fn clientmount { 9fs kfs }
c=/dist/replica
clientroot=/
clientproto=/sys/src/cmd/perl/perl.proto
clientdb=$c/client/perl.db
clientexclude=(dist/replica/client)
clientlog=$c/client/perl.log
--

5. Now you can do a pull.

replica/pull /usr/glenda/perl/dist/perl


-- 
http://vejeta.com/portal
Fidonet: 2:345/432.2



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread erik quanstrom
On Fri Dec 19 14:24:52 EST 2008, ano...@gmail.com wrote:
  client by definition knows more than the server.
 
 i assume you mean knows less? the server knows where EOF is and
 which files to enforce append-only on. your #1 seems to only exist
 because the client doesn't have that info.

i think it's deeper than that.

if the server has instructions to stick the write at the
end of the file, the server has the ability to prevent
any other writes while executing the append.  doing
this at the client side is hard because regardless of the
client's knowledge, there can be other clients which also
believe they know things equally well and without some
sort of locking or other shenagins on the side, there's a race.

the server is almost by definition in a better position
to append than the client.

- erik



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread ron minnich
On Fri, Dec 19, 2008 at 11:21 AM, Anthony Sorace ano...@gmail.com wrote:
 client by definition knows more than the server.

 i assume you mean knows less? the server knows where EOF is and
 which files to enforce append-only on. your #1 seems to only exist
 because the client doesn't have that info.

in stateless, client knows more, believe it or not.

ron



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread Roman Shaposhnik

On Dec 19, 2008, at 12:23 AM, Russ Cox wrote:

Append-only and exclusive-use are properties of files
and need to be enforced uniformly across all clients
to be meaningful.  They must be per-file, not per-fd.



Two questions:
   1. But before I ask this one: I don't deny that per-file append-only
is *extremely* useful. My question is a different one: what is
the danger of N clients accesing the file X in append-only mode
and M clients accesing it in random access mode? Could you,
please, give a concrete scenario?

2. Could you, please, answer the question in the original email
of whether the kind of trivial patch (for the real thing you also  
need
to handle O_APPEND in the fusecreate)  I provided would be  
acceptable
for the inclusion into Hg? I have no problem maintaining the  
extra code

on the side, but if the change is deemed *not*
to be acceptable that translates into it being dangerous or not  
good
enough. And if that's the case I'd really appreciate an  
explanation to

be given.

Thanks,
Roman.



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread erik quanstrom
 Two questions:
 1. But before I ask this one: I don't deny that per-file append-only
  is *extremely* useful. My question is a different one: what is
  the danger of N clients accesing the file X in append-only mode
  and M clients accesing it in random access mode? Could you,
  please, give a concrete scenario?

credit geoff for bringing this up: upas mailboxes.
suppose you have upas/deliver trying to deliver a message and at
the same time you have upas/fs trying to rewrite the mailbox.
(play along for a bit.  ignore L.mbox and the temporary mbox
tricks.)

- erik



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread Roman Shaposhnik

On Dec 19, 2008, at 8:44 AM, ron minnich wrote:

On Thu, Dec 18, 2008 at 7:59 PM, Roman Shaposhnik r...@sun.com wrote:

On Dec 18, 2008, at 7:26 PM, ron minnich wrote:


On Thu, Dec 18, 2008 at 7:06 PM, Roman Shaposhnik r...@sun.com  
wrote:


Its fun, yes. But I believe this is more of a testament to the
statelessness
of the NFS
plus the fact that the end of file is not a well defined offset  
(unlike

beginning of
the file).


no, it's even worse with stateful systems.




you want to write at EOF. Where is EOF? On Plan 9 on an append file,
server by definition always knows: it's where the last write was. So
writes go at EOF.


And how is it different from what I was suggesting: A Fid that makes
*all* writes be at EOF? You want to write at EOF? Easy -- just use
that pre-negotiated Fid that was opened with (now non existent)
DMAPPEND flag added to the mode. You want a random-access
write AT THE SAME TIME? Easy -- just open that very same Qid one
more time and have a Fid that does honor offsets in your writes.

Once again -- I don't deny that ALSO having ALWAYS append
files is extremely useful.

All I'm saying is that from where I sit the idea of ALSO having
a way to make append-only Fids seems to be extremely useful
in its own right. And nobody yet cared to give a concrete explanation
of why it might be a bad idea.


The 'client write at EOF' is bad for precisely the same reason that
you don't want to use shared memory for locks in a CC-NUMA machine;
you want to send the operation to the data, not move the data to the
operation. Lots of great papers on this over the years ...


That is exactly what I'm suggesting -- have yet another mechanism to
let the server decide where the EOF is.

Thanks,
Roman.

P.S. Am I that incomprehensible? :-(



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread ron minnich
On Fri, Dec 19, 2008 at 11:49 AM, Roman Shaposhnik r...@sun.com wrote:

 Two questions:
   1. But before I ask this one: I don't deny that per-file append-only
is *extremely* useful. My question is a different one: what is
the danger of N clients accesing the file X in append-only mode
and M clients accesing it in random access mode? Could you,
please, give a concrete scenario?

there are no problems if you don't care about the integrity of the data.

ron



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread Roman Shaposhnik

On Dec 19, 2008, at 11:56 AM, erik quanstrom wrote:

Two questions:
   1. But before I ask this one: I don't deny that per-file append- 
only

is *extremely* useful. My question is a different one: what is
the danger of N clients accesing the file X in append-only mode
and M clients accesing it in random access mode? Could you,
please, give a concrete scenario?


credit geoff for bringing this up: upas mailboxes.
suppose you have upas/deliver trying to deliver a message and at
the same time you have upas/fs trying to rewrite the mailbox.
(play along for a bit.  ignore L.mbox and the temporary mbox
tricks.)



It is difficult to answer your question without knowing what rewrite
actually does and how mailboxes are structured. But in an imaginary
world where a mailbox is a list of constant sized blocks (sizeiounit)
a bunch of simultaneous appends and rewrites of existing blocks
would work perfectly well.

Thanks,
Roman.



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread erik quanstrom
 It is difficult to answer your question without knowing what rewrite
 actually does and how mailboxes are structured. But in an imaginary
 world where a mailbox is a list of constant sized blocks (sizeiounit)
 a bunch of simultaneous appends and rewrites of existing blocks
 would work perfectly well.

(your imaginary mailbox sounds like a wormhole that builds a filesystem
inside a file.)

a mailbox, if you recall from unix, is a bunch of messages concatinated
into a file.  each message is framed by a From  line and a blank line.

obviously, this is not efficient for big mailboxes.  since i support users
with GB+ mailboxes, i implemented a one-file-per message scheme
which doesn't require append semantics, though it does use atomic
open.

- erik



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread Charles Forsyth
 if that -1 would be seen on the wire

no. it's just a flag to select the code path that provides the offset,
and entirely internal (just as well).



Re: [9fans] 9pfuse and O_APPEND

2008-12-19 Thread ron minnich
On Fri, Dec 19, 2008 at 1:32 PM, Charles Forsyth fors...@terzarima.net wrote:
 if that -1 would be seen on the wire

 no. it's just a flag to select the code path that provides the offset,
 and entirely internal (just as well).



I figured as much. Oh well. Sorry, Roman.

ron



[9fans] [possibly off-topic] something random I found a few months ago

2008-12-19 Thread Pietro Gagliardi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

A portion of the Mac OS X cat manual page. This was back in July. I  
don't remember if this was while I had OS X 10.4 or 10.5. Either way,  
it's the same now (10.5.6).


	CAT(1)BSD General Commands  
Manual   CAT(1)


NAME
 cat -- concatenate and print files

SYNOPSIS
 cat [-benstuv] [-] [file ...]

...

SEE ALSO
 head(1), more(1), pr(1), tail(1), vis(1)

	 Rob Pike, UNIX Style, or cat -v Considered Harmful, USENIX  
Summer

 Conference Proceedings, 1983.

HISTORY
 A cat utility appeared in Version 6 ATT UNIX.

	3rd Berkeley Distribution May 2, 19953rd Berkeley  
Distribution


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAklMMGYACgkQuv7AVNQDs+zkxQCbBbKrv9BemYfemXjkYUmtmAlA
/+0An0Ho72xd9xqveL/Bbv7H97tAZWzh
=annc
-END PGP SIGNATURE-



[9fans] Embedded MIPS board

2008-12-19 Thread Nathaniel W Filardo
Have people seen http://wiki.ubnt.com/wiki/index.php/RouterStation ?  Any
idea on what porting the kernel to this guy would be like?

Thanks.
--nwf;


pgpkIwKBWkcjF.pgp
Description: PGP signature