All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] pygrub: make it work
Date: Thu, 19 Feb 2009 11:16:36 -0700	[thread overview]
Message-ID: <499DA204.5080408@Sun.COM> (raw)
In-Reply-To: <18845.39159.846108.995200@mariner.uk.xensource.com>

Ian Jackson wrote:

> Surely this dependence on uname is wrong.  Why would set the termios
> flags on the pty master ?  They should be set on the slave
> unconditionally.

It's been a while since I originally did this patch, so my memory is a 
little rusty, but as far as I remember, I simply wanted to avoid 
breaking Linux after an earlier version of the patch did so. I tested 
the final version of the patch on Linux, and it worked fine. It could be 
that the uname tests aren't needed anymore.

> 
> And keeping the slave fd around for a while is harmless too.  So I
> guess I'm asking why these changes need to be conditional.
> 
>> +    # filedescriptors:
>> +    #   r - input from the bootloader (bootstring output)
>> +    #   m1 - input/output from/to xenconsole
>> +    #   m2 - input/output from/to pty that controls the bootloader
> 
> Can you explain what the purpose of this new code is or relevantly how
> it differs from the old (ie, what was wrong with the old code) ?

The comments I added explain it:

+    # The filedescriptors are NDELAY, so it's ok to try to read
+    # bigger chunks than may be available, to keep e.g. curses
+    # screen redraws in the bootloader efficient. m1 is the side that
+    # gets xenconsole input, which will be keystrokes, so a small number
+    # is sufficient. m2 is pygrub output, which will be curses screen
+    # updates, so a larger number (1024) is appropriate there.
+    #
+    # For writeable descriptors, only include them in the set for select
+    # if there is actual data to write, otherwise this would loop too fast,
+    # eating up CPU time.


- Frank

  reply	other threads:[~2009-02-19 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  9:48 [PATCH] pygrub: make it work Christoph Egger
2009-02-19 17:37 ` Ian Jackson
2009-02-19 18:16   ` Frank van der Linden [this message]
2009-02-19 18:45     ` Ian Jackson
2009-02-19 19:01       ` Frank van der Linden
2009-02-23 16:25         ` Ian Jackson

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=499DA204.5080408@Sun.COM \
    --to=frank.vanderlinden@sun.com \
    --cc=Christoph.Egger@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.