WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 5 of 9] libxl: only use interactive PyGrub mode w

On Mon, 2011-10-10 at 14:16 +0100, Roger Pau Monné wrote:
> > I think "-c" shouldn't affect the functionality of the domain, just
> > whether the console is initially connected.  Perhaps the console will
> > be connected somewhere else.
> >
> > OTOH I think it would be fine to have an option (libxl config
> > parameter, I guess) to make pygrub run noninteractively.
> 
> I've digged a little more into this issue, and found out that NetBSD
> ptys have a 1024 buffer limit, and when this limit is hit, the select
                  ^byte ?

> from libxl_bootloader:211 blocks and no more data is writen to
> xenconsole_fd and no more data is read from bootloader_fd (because
> bootloader_buf contains data),

IIRC I made that last condition like that because it simplified things
because I could avoid worrying about wrapping the consumer round in the
buffer, or something. However if that scheme doesn't work for BSD we
could go the more complex route, assuming it would help.

This could well be a problem on Linux too but we are just avoiding it
due to the larger buffers. I wonder if I can artificially reduce the
buffer size on Linux...

>  which of course blocks the execution of
> pygrub. Since the xenconsoled_fd pty is not monitored by xenconsole,
> nobody is draining data from it. I don't know the best way to solve
> this, but it seems like somebody should read the data from
> xenconsoled_fd and dispose it if there is no console attached.

Yes. One option could be to add a timeout to the select and throwaway
data if necessary. I think xenconsoled does this for real guest consoles
too if no one is connected so that behaviour would at least be
consistent. Or maybe xenconsoled should be doing this for this pty like
it does for guests?

Might another option be to increase the size of the buffer in libxl to
>1K? More of a workaround than a solution I suppose.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel