9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 8c question
@ 2005-07-01 23:17 Tim Newsham
  2005-07-02 12:43 ` Charles Forsyth
  0 siblings, 1 reply; 31+ messages in thread
From: Tim Newsham @ 2005-07-01 23:17 UTC (permalink / raw)
  To: 9fans

Is it possible to make a zero-length type (ie. a structure or
array of zero length) in 8c?  The headers in xen3 require this
(ugh) and it cant be worked around without breaking the cross
platform features of their headers.

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-01 23:17 [9fans] 8c question Tim Newsham
@ 2005-07-02 12:43 ` Charles Forsyth
  2005-07-05  2:36   ` David Leimbach
  0 siblings, 1 reply; 31+ messages in thread
From: Charles Forsyth @ 2005-07-02 12:43 UTC (permalink / raw)
  To: 9fans

>>it cant be worked around without breaking the cross
>>platform features of their headers.

sounds brilliantly portable to me.
what do they do?  insert 0-length padding areas
to make these structures `portable'?



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-02 12:43 ` Charles Forsyth
@ 2005-07-05  2:36   ` David Leimbach
  2005-07-05 14:47     ` Ronald G. Minnich
  2005-07-05 15:27     ` Latchesar Ionkov
  0 siblings, 2 replies; 31+ messages in thread
From: David Leimbach @ 2005-07-05  2:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/2/05, Charles Forsyth <forsyth@terzarima.net> wrote:
> >>it cant be worked around without breaking the cross
> >>platform features of their headers.
> 
> sounds brilliantly portable to me.
> what do they do?  insert 0-length padding areas
> to make these structures `portable'?
> 
> 
Yeah, it's undefined what happens if a struct is empty in C99. Seems a
really silly thing for someone to rely on.  What are they trying to
accomplish?  The only thing I can think of is some kind of type safety
based on a tag generated for a unique "struct".  They should probably
make it wrap a void * or something.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05  2:36   ` David Leimbach
@ 2005-07-05 14:47     ` Ronald G. Minnich
  2005-07-05 15:27     ` Latchesar Ionkov
  1 sibling, 0 replies; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-05 14:47 UTC (permalink / raw)
  To: David Leimbach, Fans of the OS Plan 9 from Bell Labs



On Mon, 4 Jul 2005, David Leimbach wrote:

> On 7/2/05, Charles Forsyth <forsyth@terzarima.net> wrote:
> > >>it cant be worked around without breaking the cross
> > >>platform features of their headers.
> > 
> > sounds brilliantly portable to me.
> > what do they do?  insert 0-length padding areas
> > to make these structures `portable'?
> > 
> > 
> Yeah, it's undefined what happens if a struct is empty in C99. Seems a
> really silly thing for someone to rely on.  What are they trying to
> accomplish?  The only thing I can think of is some kind of type safety
> based on a tag generated for a unique "struct".  They should probably
> make it wrap a void * or something.
> 


IIRC this is one of those deals where people do something liiek:

struct element {
	int x,y;
};

struct a {
	int numelements;
	struct elements blah[0];
};

is that it Tim? I might be wrong on this. 

It's not reliable in gcc, as we found out the hard way on the linuxbios 
project ...

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05  2:36   ` David Leimbach
  2005-07-05 14:47     ` Ronald G. Minnich
@ 2005-07-05 15:27     ` Latchesar Ionkov
  2005-07-05 15:33       ` Ronald G. Minnich
  2005-07-05 15:35       ` David Leimbach
  1 sibling, 2 replies; 31+ messages in thread
From: Latchesar Ionkov @ 2005-07-05 15:27 UTC (permalink / raw)
  To: David Leimbach, Fans of the OS Plan 9 from Bell Labs

An example:

	typedef struct {
		....
		arch_vcpu_info_t arch;
	} vcpu_info_t;

For x86_32 and x86_64 arch_vcpu_info_t is defined as:

	typedef struct {
	} arch_vcpu_info_t;

    Lucho

On Mon, Jul 04, 2005 at 07:36:58PM -0700, David Leimbach said:
> On 7/2/05, Charles Forsyth <forsyth@terzarima.net> wrote:
> > >>it cant be worked around without breaking the cross
> > >>platform features of their headers.
> > 
> > sounds brilliantly portable to me.
> > what do they do?  insert 0-length padding areas
> > to make these structures `portable'?
> > 
> > 
> Yeah, it's undefined what happens if a struct is empty in C99. Seems a
> really silly thing for someone to rely on.  What are they trying to
> accomplish?  The only thing I can think of is some kind of type safety
> based on a tag generated for a unique "struct".  They should probably
> make it wrap a void * or something.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05 15:27     ` Latchesar Ionkov
@ 2005-07-05 15:33       ` Ronald G. Minnich
  2005-07-05 18:33         ` Tim Newsham
  2005-07-05 15:35       ` David Leimbach
  1 sibling, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-05 15:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Tue, 5 Jul 2005, Latchesar Ionkov wrote:

> An example:
> 
> 	typedef struct {
> 		....
> 		arch_vcpu_info_t arch;
> 	} vcpu_info_t;
> 
> For x86_32 and x86_64 arch_vcpu_info_t is defined as:
> 
> 	typedef struct {
> 	} arch_vcpu_info_t;
> 
>     Lucho

oh, wow, had not remembered this one. 

so, can we convince them to put in something like
	int nothingtoseeheremovealong;

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05 15:27     ` Latchesar Ionkov
  2005-07-05 15:33       ` Ronald G. Minnich
@ 2005-07-05 15:35       ` David Leimbach
  2005-07-07 23:08         ` Charles Forsyth
  1 sibling, 1 reply; 31+ messages in thread
From: David Leimbach @ 2005-07-05 15:35 UTC (permalink / raw)
  To: Latchesar Ionkov; +Cc: Fans of the OS Plan 9 from Bell Labs


On Jul 5, 2005, at 8:27 AM, Latchesar Ionkov wrote:

> An example:
>
>     typedef struct {
>         ....
>         arch_vcpu_info_t arch;
>     } vcpu_info_t;
>
> For x86_32 and x86_64 arch_vcpu_info_t is defined as:
>
>     typedef struct {
>     } arch_vcpu_info_t;
>

That's undefined behavior by the C99 standard, as far as I can tell.

You are supposed to have a non-empty list of identifiers and types
in any given struct or union.

Definitely not good for portability.

Dave


>     Lucho
>
> On Mon, Jul 04, 2005 at 07:36:58PM -0700, David Leimbach said:
>
>> On 7/2/05, Charles Forsyth <forsyth@terzarima.net> wrote:
>>
>>>>> it cant be worked around without breaking the cross
>>>>> platform features of their headers.
>>>>>
>>>
>>> sounds brilliantly portable to me.
>>> what do they do?  insert 0-length padding areas
>>> to make these structures `portable'?
>>>
>>>
>>>
>> Yeah, it's undefined what happens if a struct is empty in C99.  
>> Seems a
>> really silly thing for someone to rely on.  What are they trying to
>> accomplish?  The only thing I can think of is some kind of type  
>> safety
>> based on a tag generated for a unique "struct".  They should probably
>> make it wrap a void * or something.
>



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05 15:33       ` Ronald G. Minnich
@ 2005-07-05 18:33         ` Tim Newsham
  0 siblings, 0 replies; 31+ messages in thread
From: Tim Newsham @ 2005-07-05 18:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> so, can we convince them to put in something like
> 	int nothingtoseeheremovealong;

I'm trying to.

> ron

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-05 15:35       ` David Leimbach
@ 2005-07-07 23:08         ` Charles Forsyth
  2005-07-08  0:06           ` Ronald G. Minnich
  2005-07-08  3:31           ` Tim Newsham
  0 siblings, 2 replies; 31+ messages in thread
From: Charles Forsyth @ 2005-07-07 23:08 UTC (permalink / raw)
  To: 9fans

i don't understand.  if it's in the portability interface,
you say what arch_vcpu_info_t is, so why not
typedef int arch_vcpu_info_t;
and be done with it.  i don't see why it must be a struct
in that context.

i'd assumed (based on having looked at some xen headers
a month ago) that they'd used 0-length things to try to
get round some portability problem with `packed' structs,
but the problem seems simpler than that.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-07 23:08         ` Charles Forsyth
@ 2005-07-08  0:06           ` Ronald G. Minnich
  2005-07-08  0:27             ` Russ Cox
  2005-07-08  3:31           ` Tim Newsham
  1 sibling, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-08  0:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Fri, 8 Jul 2005, Charles Forsyth wrote:

> i don't understand.  if it's in the portability interface, you say what
> arch_vcpu_info_t is, so why not typedef int arch_vcpu_info_t; and be
> done with it.  i don't see why it must be a struct in that context.

As I understand it, current Linux practice is to not use typedefs. So, 
that approach will not go.

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08  0:06           ` Ronald G. Minnich
@ 2005-07-08  0:27             ` Russ Cox
  2005-07-08 14:36               ` Ronald G. Minnich
  0 siblings, 1 reply; 31+ messages in thread
From: Russ Cox @ 2005-07-08  0:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Nonsense.  There are plenty of typedefs in Linux.

tux=; pwd
/usr/src/kernel-source-2.6.5
tux=; find . -name '*.c' | xargs -n 100 grep typedef | wc
   1278    5476   79522
tux=; 

Russ


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-07 23:08         ` Charles Forsyth
  2005-07-08  0:06           ` Ronald G. Minnich
@ 2005-07-08  3:31           ` Tim Newsham
  2005-07-08 11:14             ` Charles Forsyth
  2005-07-09  1:04             ` Tim Newsham
  1 sibling, 2 replies; 31+ messages in thread
From: Tim Newsham @ 2005-07-08  3:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> i don't understand.  if it's in the portability interface,
> you say what arch_vcpu_info_t is, so why not
> typedef int arch_vcpu_info_t;
> and be done with it.  i don't see why it must be a struct
> in that context.

Typedefing it to an int would be fine, except then it will
be four bytes larger in Plan9 than it is in the Xen host.
Since this is a shared data structure, bad things will happen.

I think I might be able to get them to set it to some fixed
length size and just waste some space.  Its just a matter of
me getting time to create a patch and test it and submit it.

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08  3:31           ` Tim Newsham
@ 2005-07-08 11:14             ` Charles Forsyth
  2005-07-09  1:04             ` Tim Newsham
  1 sibling, 0 replies; 31+ messages in thread
From: Charles Forsyth @ 2005-07-08 11:14 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

sorry, i hadn't properly understood the context in which those
declarations were used.  i'll look at them again with that in mind.

[-- Attachment #2: Type: message/rfc822, Size: 2996 bytes --]

From: Tim Newsham <newsham@lava.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] 8c question
Date: Thu, 7 Jul 2005 17:31:00 -1000 (HST)
Message-ID: <Pine.BSI.4.61.0507071729150.8592@malasada.lava.net>

> i don't understand.  if it's in the portability interface,
> you say what arch_vcpu_info_t is, so why not
> typedef int arch_vcpu_info_t;
> and be done with it.  i don't see why it must be a struct
> in that context.

Typedefing it to an int would be fine, except then it will
be four bytes larger in Plan9 than it is in the Xen host.
Since this is a shared data structure, bad things will happen.

I think I might be able to get them to set it to some fixed
length size and just waste some space.  Its just a matter of
me getting time to create a patch and test it and submit it.

Tim Newsham
http://www.lava.net/~newsham/

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08  0:27             ` Russ Cox
@ 2005-07-08 14:36               ` Ronald G. Minnich
  2005-07-08 19:03                 ` jmk
  0 siblings, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-08 14:36 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs



On Thu, 7 Jul 2005, Russ Cox wrote:

> Nonsense.  There are plenty of typedefs in Linux.

for scalar types, sure. They're all over the place. Did you look any 
deeper than the grep | wc?

What is being proposed is a typedef for something that might or might not 
be a struct, depending on architecture. I'll be interested to see if that 
flies. Go for it.

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08 14:36               ` Ronald G. Minnich
@ 2005-07-08 19:03                 ` jmk
  2005-07-08 19:40                   ` Charles Forsyth
  2005-07-09  1:02                   ` Ronald G. Minnich
  0 siblings, 2 replies; 31+ messages in thread
From: jmk @ 2005-07-08 19:03 UTC (permalink / raw)
  To: 9fans

On Fri Jul  8 10:37:10 EDT 2005, rminnich@lanl.gov wrote:
> 
> 
> On Thu, 7 Jul 2005, Russ Cox wrote:
> 
> > Nonsense.  There are plenty of typedefs in Linux.
> 
> for scalar types, sure. They're all over the place. Did you look any 
> deeper than the grep | wc?
> 
> What is being proposed is a typedef for something that might or might not 
> be a struct, depending on architecture. I'll be interested to see if that 
> flies. Go for it.
> 
> ron

There are actually more 'struct' typedefs in the linux header files
than Russ found in the .c files:

ethel% pwd
/n/other/jmk/linux-2.6.9/include
ethel% grep 'typedef.*{' */*.h|wc 
   1351    5593   62194
ethel% 

e.g. linux/spinlock.h:

#if (__GNUC__ > 2)
  typedef struct { } spinlock_t;
  #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
#else
  typedef struct { int gcc_is_buggy; } spinlock_t;
  #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
#endif


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08 19:03                 ` jmk
@ 2005-07-08 19:40                   ` Charles Forsyth
  2005-07-09  1:02                   ` Ronald G. Minnich
  1 sibling, 0 replies; 31+ messages in thread
From: Charles Forsyth @ 2005-07-08 19:40 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

talk about making something simple as bizarre as possible.
that include file is just amazing, quite remarkable.

[-- Attachment #2: Type: message/rfc822, Size: 3013 bytes --]

From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] 8c question
Date: Fri, 8 Jul 2005 15:03:12 -0400
Message-ID: <f4e875772b165f384f8dd867dc1819b0@plan9.bell-labs.com>

On Fri Jul  8 10:37:10 EDT 2005, rminnich@lanl.gov wrote:
> 
> 
> On Thu, 7 Jul 2005, Russ Cox wrote:
> 
> > Nonsense.  There are plenty of typedefs in Linux.
> 
> for scalar types, sure. They're all over the place. Did you look any 
> deeper than the grep | wc?
> 
> What is being proposed is a typedef for something that might or might not 
> be a struct, depending on architecture. I'll be interested to see if that 
> flies. Go for it.
> 
> ron

There are actually more 'struct' typedefs in the linux header files
than Russ found in the .c files:

ethel% pwd
/n/other/jmk/linux-2.6.9/include
ethel% grep 'typedef.*{' */*.h|wc 
   1351    5593   62194
ethel% 

e.g. linux/spinlock.h:

#if (__GNUC__ > 2)
  typedef struct { } spinlock_t;
  #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
#else
  typedef struct { int gcc_is_buggy; } spinlock_t;
  #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
#endif

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08 19:03                 ` jmk
  2005-07-08 19:40                   ` Charles Forsyth
@ 2005-07-09  1:02                   ` Ronald G. Minnich
  1 sibling, 0 replies; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-09  1:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Fri, 8 Jul 2005 jmk@plan9.bell-labs.com wrote:

> There are actually more 'struct' typedefs in the linux header files
> than Russ found in the .c files:

yeah, maybe I should have been less terse. 

Based on past year and change of watching the infiniband mailling list
discussions, my overall belief is that something along the lines of

if you're a 386
typedef int xyz;

if you're some other arch:
typedef struct { int somestuff} xyz;

and then using that in something else, e.g. another struct or a function 
prototype, is just not going to be well received. I may well be wrong, 
some of the discussions get a little abstruse for me, and I ended up 
blowing the email thread away.

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-08  3:31           ` Tim Newsham
  2005-07-08 11:14             ` Charles Forsyth
@ 2005-07-09  1:04             ` Tim Newsham
  2005-07-09  9:40               ` Charles Forsyth
  1 sibling, 1 reply; 31+ messages in thread
From: Tim Newsham @ 2005-07-09  1:04 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I think I might be able to get them to set it to some fixed
> length size and just waste some space.  Its just a matter of
> me getting time to create a patch and test it and submit it.

They went ahead and put stuff into the empty structure (useful
stuff too!) making the problem magically disappear.  We
can all sleep tight tonight.

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-09  1:04             ` Tim Newsham
@ 2005-07-09  9:40               ` Charles Forsyth
  2005-07-11  0:57                 ` Ronald G. Minnich
  0 siblings, 1 reply; 31+ messages in thread
From: Charles Forsyth @ 2005-07-09  9:40 UTC (permalink / raw)
  To: 9fans

>>We can all sleep tight tonight.

not if i start to wonder about the surrounding software, when such
sloppy assumptions are made in something as important as
the interface.  i'd already thought, glancing at it months ago,
that there seemed to be rather a lot of interface, which also
made me wonder, but i'd made a mental note to revisit it
when i had more time.



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-09  9:40               ` Charles Forsyth
@ 2005-07-11  0:57                 ` Ronald G. Minnich
  2005-07-11  1:26                   ` [9fans] Xen comms Tim Newsham
  2005-07-11 19:23                   ` [9fans] 8c question Eric Van Hensbergen
  0 siblings, 2 replies; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-11  0:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Sat, 9 Jul 2005, Charles Forsyth wrote:

> not if i start to wonder about the surrounding software, when such
> sloppy assumptions are made in something as important as the interface.  
> i'd already thought, glancing at it months ago, that there seemed to be
> rather a lot of interface, which also made me wonder, but i'd made a
> mental note to revisit it when i had more time.

we have been trying and failing to get the xen guys interested in 9p as 
the backbone comms for inter-domain communication in Xen, both dom0->domU 
and domU->domU. 

What we're lacking is anyone with a time to write the proof-of-concept 
implementation. I wish we could get it done, because the inter-domain 
comms in xen just keep getting more and more complex. 

It's been hard to even argue that you could use the same
open/read/write/close interface for a disk and an ethernet device. "Linux
doesn't do that ...". So we have a disk virtual device and an ethernet
virtual device that are very, very different in implementation, even
though it's basically a 2-way shared-memory fifo queue in each case. I
really think they could be the same.

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [9fans] Xen comms
  2005-07-11  0:57                 ` Ronald G. Minnich
@ 2005-07-11  1:26                   ` Tim Newsham
  2005-07-11 19:21                     ` Eric Van Hensbergen
  2005-07-11 19:23                   ` [9fans] 8c question Eric Van Hensbergen
  1 sibling, 1 reply; 31+ messages in thread
From: Tim Newsham @ 2005-07-11  1:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> we have been trying and failing to get the xen guys interested in 9p as
> the backbone comms for inter-domain communication in Xen, both dom0->domU
> and domU->domU.

I think it would be a hard sell.  You'd still want to have something
like a shared memory queue to exchange messages but on top of
that you'd have a rather large amount of 9p machinery.

> ron

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] Xen comms
  2005-07-11  1:26                   ` [9fans] Xen comms Tim Newsham
@ 2005-07-11 19:21                     ` Eric Van Hensbergen
  0 siblings, 0 replies; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 19:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/10/05, Tim Newsham <newsham@lava.net> wrote:
> > we have been trying and failing to get the xen guys interested in 9p as
> > the backbone comms for inter-domain communication in Xen, both dom0->domU
> > and domU->domU.
> 
> I think it would be a hard sell.  You'd still want to have something
> like a shared memory queue to exchange messages but on top of
> that you'd have a rather large amount of 9p machinery.
> 

Remember that the shared memory is just one piece of the Xen comms -
they've got all this other cruft for different device classes and bus
provisioning.  That is what we are talking about replacing with 9P -
and while I'm not certain, I think its a pretty good bet that 9P will
end up being more compact that the other cruft and better suited to
transport over different networks when/where necessary.

             -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11  0:57                 ` Ronald G. Minnich
  2005-07-11  1:26                   ` [9fans] Xen comms Tim Newsham
@ 2005-07-11 19:23                   ` Eric Van Hensbergen
  2005-07-11 19:58                     ` Ronald G. Minnich
  1 sibling, 1 reply; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 19:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/10/05, Ronald G. Minnich <rminnich@lanl.gov> wrote:
> 
> What we're lacking is anyone with a time to write the proof-of-concept
> implementation. I wish we could get it done, because the inter-domain
> comms in xen just keep getting more and more complex.
> 

Now that he has recover more or less working, Gorka is going to take a
look at this.  Burning a Xen CD for him right now.  A question for you
Ron - would it be bad to prototype on the more stable Xen 2.0?  I'd
hate to waste time if too much of the device channel interface is
chaning for 3.0...

            -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 19:23                   ` [9fans] 8c question Eric Van Hensbergen
@ 2005-07-11 19:58                     ` Ronald G. Minnich
  2005-07-11 20:05                       ` Eric Van Hensbergen
  0 siblings, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-11 19:58 UTC (permalink / raw)
  To: Eric Van Hensbergen, Fans of the OS Plan 9 from Bell Labs



On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:

> Now that he has recover more or less working, Gorka is going to take a
> look at this.  Burning a Xen CD for him right now.  A question for you
> Ron - would it be bad to prototype on the more stable Xen 2.0?  I'd hate
> to waste time if too much of the device channel interface is chaning for
> 3.0...

newsham can tell us more. But my inclination, given the spin rate of 3.0, 
is to go for 2.0 for proof-of-concept. After all, to get it working on 
3.0, you have to first finish the port of plan 9 to 3.0 ...


it's be nice to have a '#X' or something so:

bind '#X' /dev/xen
and then see /dev/xen/net0, /dev/xen/disk0, and so on, and then

disk/fdisk /dev/xen/disk0/data > /dev/xen/disk0/ctl

bind /dev/xen/net0 /net

and so on.

or maybe the bind would result in stuff like 
/dev/xennet0
/dev/xensd00

etc.

?

Does this sound right or I am way off base here. 

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 19:58                     ` Ronald G. Minnich
@ 2005-07-11 20:05                       ` Eric Van Hensbergen
  2005-07-11 20:15                         ` Ronald G. Minnich
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 20:05 UTC (permalink / raw)
  To: Ronald G. Minnich; +Cc: Fans of the OS Plan 9 from Bell Labs

On 7/11/05, Ronald G. Minnich <rminnich@lanl.gov> wrote:
> 
> 
> On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:
> 
> > Now that he has recover more or less working, Gorka is going to take a
> > look at this.  Burning a Xen CD for him right now.  A question for you
> > Ron - would it be bad to prototype on the more stable Xen 2.0?  I'd hate
> > to waste time if too much of the device channel interface is chaning for
> > 3.0...
> 
> newsham can tell us more. But my inclination, given the spin rate of 3.0,
> is to go for 2.0 for proof-of-concept. After all, to get it working on
> 3.0, you have to first finish the port of plan 9 to 3.0 ...
>

Well, we're going to prototype stuff with v9fs on Linux to get stuff
working quickly, then move to Plan 9 native.
 
> 
> it's be nice to have a '#X' or something so:
> 
> bind '#X' /dev/xen
> and then see /dev/xen/net0, /dev/xen/disk0, and so on, and then
> 

Oi - my gut is that this sounds wrong.  What would make more sense is
for #X to look more like devsrv, with the virtual channels
representing.  Then you could mount /dev/xen/dom0 /n/dom0 and then
bind as you like.

        -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 20:05                       ` Eric Van Hensbergen
@ 2005-07-11 20:15                         ` Ronald G. Minnich
  2005-07-11 20:35                           ` Eric Van Hensbergen
  0 siblings, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-11 20:15 UTC (permalink / raw)
  To: Eric Van Hensbergen; +Cc: Fans of the OS Plan 9 from Bell Labs



On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:

> Oi - my gut is that this sounds wrong.  What would make more sense is
> for #X to look more like devsrv, with the virtual channels representing.  
> Then you could mount /dev/xen/dom0 /n/dom0 and then bind as you like.

Can those channels correspond to the current channels that talk via fifo 
queue to in-kernel linux devices (the so-called backend devices)?

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 20:15                         ` Ronald G. Minnich
@ 2005-07-11 20:35                           ` Eric Van Hensbergen
  2005-07-11 20:38                             ` Ronald G. Minnich
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 20:35 UTC (permalink / raw)
  To: Ronald G. Minnich; +Cc: Fans of the OS Plan 9 from Bell Labs

On 7/11/05, Ronald G. Minnich <rminnich@lanl.gov> wrote:
> 
> 
> On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:
> 
> > Oi - my gut is that this sounds wrong.  What would make more sense is
> > for #X to look more like devsrv, with the virtual channels representing.
> > Then you could mount /dev/xen/dom0 /n/dom0 and then bind as you like.
> 
> Can those channels correspond to the current channels that talk via fifo
> queue to in-kernel linux devices (the so-called backend devices)?
> 

Yeah, well -- sorta.  You probably have a better understanding of the
way Xen does stuff than I do.  I guess in the current context that is
exactly what they would correspond to, but in a 9P-based world, you
would only need a single channel.  You would mount the exported
private namespace containing the devices allocated to your partition
over that channel (instead of individually mounting disk, network,
etc.)

I haven't fully thought through how this would extend across a cluster
yet - but I think a bridging I/O partition would "just work".  Not
sure if I would have "cluster" channels or whether the I/O partition
would mount from other servers and then re-export the resources.

       -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 20:35                           ` Eric Van Hensbergen
@ 2005-07-11 20:38                             ` Ronald G. Minnich
  2005-07-11 21:03                               ` Eric Van Hensbergen
  0 siblings, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-11 20:38 UTC (permalink / raw)
  To: Eric Van Hensbergen; +Cc: Fans of the OS Plan 9 from Bell Labs



On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:

> Yeah, well -- sorta.  You probably have a better understanding of the
> way Xen does stuff than I do.  I guess in the current context that is
> exactly what they would correspond to, but in a 9P-based world, you
> would only need a single channel.  You would mount the exported
> private namespace containing the devices allocated to your partition
> over that channel (instead of individually mounting disk, network,
> etc.)

that's not real xen-device-compatible, but let's go with it for now, just
to get proof-of-concept going.

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 20:38                             ` Ronald G. Minnich
@ 2005-07-11 21:03                               ` Eric Van Hensbergen
  2005-07-11 21:09                                 ` Ronald G. Minnich
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 21:03 UTC (permalink / raw)
  To: Ronald G. Minnich; +Cc: Fans of the OS Plan 9 from Bell Labs

On 7/11/05, Ronald G. Minnich <rminnich@lanl.gov> wrote:
> 
> 
> On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:
> 
> > Yeah, well -- sorta.  You probably have a better understanding of the
> > way Xen does stuff than I do.  I guess in the current context that is
> > exactly what they would correspond to, but in a 9P-based world, you
> > would only need a single channel.  You would mount the exported
> > private namespace containing the devices allocated to your partition
> > over that channel (instead of individually mounting disk, network,
> > etc.)
> 
> that's not real xen-device-compatible, but let's go with it for now, just
> to get proof-of-concept going.
> 

But I thought that was the whole point - to convince them to use 9P
for resource sharing versus the current stuff.  Using 9P for transport
alone just doesn't make sense to me -- let's sell them the whole
enchilada.

       -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 21:03                               ` Eric Van Hensbergen
@ 2005-07-11 21:09                                 ` Ronald G. Minnich
  2005-07-11 21:13                                   ` Eric Van Hensbergen
  0 siblings, 1 reply; 31+ messages in thread
From: Ronald G. Minnich @ 2005-07-11 21:09 UTC (permalink / raw)
  To: Eric Van Hensbergen; +Cc: Fans of the OS Plan 9 from Bell Labs



On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:

> But I thought that was the whole point - to convince them to use 9P for
> resource sharing versus the current stuff.  Using 9P for transport alone
> just doesn't make sense to me -- let's sell them the whole enchilada.

you'll lose on the performance front. I'd still like to be able to walk to 
a resource in the kernel and get a channel for it, and then use channel 
reads and writes in the kernel to write the fifo queues. 

Right now, you use a dedicated driver (which is how you name it -- you 
know the driver to use) and drive the fifo queues. 

ah, this is too hard in email. What's the next conference you're going to?

:-)

ron


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [9fans] 8c question
  2005-07-11 21:09                                 ` Ronald G. Minnich
@ 2005-07-11 21:13                                   ` Eric Van Hensbergen
  0 siblings, 0 replies; 31+ messages in thread
From: Eric Van Hensbergen @ 2005-07-11 21:13 UTC (permalink / raw)
  To: Ronald G. Minnich; +Cc: Fans of the OS Plan 9 from Bell Labs

On 7/11/05, Ronald G. Minnich <rminnich@lanl.gov> wrote:
> 
> 
> On Mon, 11 Jul 2005, Eric Van Hensbergen wrote:
> 
> > But I thought that was the whole point - to convince them to use 9P for
> > resource sharing versus the current stuff.  Using 9P for transport alone
> > just doesn't make sense to me -- let's sell them the whole enchilada.
> 
> you'll lose on the performance front. I'd still like to be able to walk to
> a resource in the kernel and get a channel for it, and then use channel
> reads and writes in the kernel to write the fifo queues.
>

With the new v9fs 2.1 server architecture, I should be able to go zero
copy all the way and match their performance -- at least that's the
plan.

> 
> Right now, you use a dedicated driver (which is how you name it -- you
> know the driver to use) and drive the fifo queues.
> 

I know, I think that sucks.  No reason this can't be unified.  The
performance sensative bits are always reads and writes -- if you can
avoid copies, and I think we can -- particularly over a shared memory
interface, then you should have equivilent performance -- just in a
unified, easy to manage wrapper -- plus we'll have built in fail-over
semantics for certain resources with Gorka's new recover stuff.

         -eric


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2005-07-11 21:13 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-01 23:17 [9fans] 8c question Tim Newsham
2005-07-02 12:43 ` Charles Forsyth
2005-07-05  2:36   ` David Leimbach
2005-07-05 14:47     ` Ronald G. Minnich
2005-07-05 15:27     ` Latchesar Ionkov
2005-07-05 15:33       ` Ronald G. Minnich
2005-07-05 18:33         ` Tim Newsham
2005-07-05 15:35       ` David Leimbach
2005-07-07 23:08         ` Charles Forsyth
2005-07-08  0:06           ` Ronald G. Minnich
2005-07-08  0:27             ` Russ Cox
2005-07-08 14:36               ` Ronald G. Minnich
2005-07-08 19:03                 ` jmk
2005-07-08 19:40                   ` Charles Forsyth
2005-07-09  1:02                   ` Ronald G. Minnich
2005-07-08  3:31           ` Tim Newsham
2005-07-08 11:14             ` Charles Forsyth
2005-07-09  1:04             ` Tim Newsham
2005-07-09  9:40               ` Charles Forsyth
2005-07-11  0:57                 ` Ronald G. Minnich
2005-07-11  1:26                   ` [9fans] Xen comms Tim Newsham
2005-07-11 19:21                     ` Eric Van Hensbergen
2005-07-11 19:23                   ` [9fans] 8c question Eric Van Hensbergen
2005-07-11 19:58                     ` Ronald G. Minnich
2005-07-11 20:05                       ` Eric Van Hensbergen
2005-07-11 20:15                         ` Ronald G. Minnich
2005-07-11 20:35                           ` Eric Van Hensbergen
2005-07-11 20:38                             ` Ronald G. Minnich
2005-07-11 21:03                               ` Eric Van Hensbergen
2005-07-11 21:09                                 ` Ronald G. Minnich
2005-07-11 21:13                                   ` Eric Van Hensbergen

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).