ia64/xen-unstable

changeset 6036:5a86ab4c9b79

Instead of queuing messages when the control channels are full, xcs just
does nothing (see ctrl_interface.c:ctrl_chan_write_request()).

The following patch throttles the rate in which consoled writes data to
xcs. With the current values, you get a responsive console but avoid
data corruption in most scenarios.

I'm able to get pretty far in my regression test with this patch. With
higher throttle values I'm able to get even further (but the console
becomes painfully slow).

I implemented proper control channel queuing in xenctld in VM-Tools and
it's pretty nasty stuff. This should prevent corruption for most users
until we can get rid of xcs.

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com
author kaf24@firebug.cl.cam.ac.uk
date Fri Aug 05 09:01:30 2005 +0000 (2005-08-05)
parents f5a5e61f038e
children 78a2f9cbd5b3
files tools/consoled/io.c
line diff
     1.1 --- a/tools/consoled/io.c	Fri Aug 05 09:00:50 2005 +0000
     1.2 +++ b/tools/consoled/io.c	Fri Aug 05 09:01:30 2005 +0000
     1.3 @@ -288,6 +288,7 @@ void handle_io(void)
     1.4  	fd_set readfds, writefds;
     1.5  	int ret;
     1.6  	int max_fd = -1;
     1.7 +	int num_of_writes = 0;
     1.8  
     1.9  	do {
    1.10  		struct domain *d;
    1.11 @@ -312,6 +313,17 @@ void handle_io(void)
    1.12  		}
    1.13  
    1.14  		ret = select(max_fd + 1, &readfds, &writefds, 0, &tv);
    1.15 +		if (tv.tv_sec == 1 && (++num_of_writes % 100) == 0) {
    1.16 +			/* FIXME */
    1.17 +			/* This is a nasty hack.  xcs does not handle the
    1.18 +			   control channels filling up well at all.  We'll
    1.19 +			   throttle ourselves here since we do proper
    1.20 +			   queueing to give the domains a shot at pulling out
    1.21 +			   the data.  Fixing xcs is not worth it as it's
    1.22 +			   going away */
    1.23 +			tv.tv_usec = 1000;
    1.24 +			select(0, 0, 0, 0, &tv);
    1.25 +		}
    1.26  		enum_domains();
    1.27  
    1.28  		if (FD_ISSET(xcs_data_fd, &readfds)) {