[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] pygrub: make it work



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

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.