Jan Beulich
2011-Oct-11 13:41 UTC
[Xen-devel] [PATCH] linux-2.6.18: improve floppy behavior
Timing is significantly different from native both because Xen traps I/O port accesses and since DMA use is not possible (without intrusive changes). Due to the overhead of trapped port accesses, I/O is already slow enough (and Xen doesn''t run on very old hardware anyway), so the situation can easily be improved by not enforcing REALLY_SLOW_IO. This doesn''t completely address the issue - Xen just cannot guarantee scheduling of a particular vCPU with a maximum latency of about 80us (needed for the default FIFO threshold value of 10). The only complete solution would require making ISA DMA usable on Xen. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -146,7 +146,9 @@ #define FLOPPY_SANITY_CHECK #undef FLOPPY_SILENT_DCL_CLEAR +#ifndef CONFIG_XEN #define REALLY_SLOW_IO +#endif #define DEBUGT 2 #define DCL_DEBUG /* debug disk change line */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2011-Oct-11 17:14 UTC
Re: [Xen-devel] [PATCH] linux-2.6.18: improve floppy behavior
On 10/11/2011 06:41 AM, Jan Beulich wrote:> Timing is significantly different from native both because Xen traps > I/O port accesses and since DMA use is not possible (without intrusive > changes). Due to the overhead of trapped port accesses, I/O is already > slow enough (and Xen doesn''t run on very old hardware anyway), so the > situation can easily be improved by not enforcing REALLY_SLOW_IO. > > This doesn''t completely address the issue - Xen just cannot guarantee > scheduling of a particular vCPU with a maximum latency of about 80us > (needed for the default FIFO threshold value of 10). The only complete > solution would require making ISA DMA usable on Xen.Just out of curiosity, was this in response to a real bug report or something? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Oct-12 09:54 UTC
Re: [Xen-devel] [PATCH] linux-2.6.18: improve floppy behavior
>>> On 11.10.11 at 19:14, Jeremy Fitzhardinge <jeremy@goop.org> wrote: > On 10/11/2011 06:41 AM, Jan Beulich wrote: >> Timing is significantly different from native both because Xen traps >> I/O port accesses and since DMA use is not possible (without intrusive >> changes). Due to the overhead of trapped port accesses, I/O is already >> slow enough (and Xen doesn''t run on very old hardware anyway), so the >> situation can easily be improved by not enforcing REALLY_SLOW_IO. >> >> This doesn''t completely address the issue - Xen just cannot guarantee >> scheduling of a particular vCPU with a maximum latency of about 80us >> (needed for the default FIFO threshold value of 10). The only complete >> solution would require making ISA DMA usable on Xen. > > Just out of curiosity, was this in response to a real bug report or > something?Indeed, it was, and I was immediately able to repro the problem. Floppy access, at least on newer kernels (it got reported against 2.6.32.x), did at best work very sluggishly. 2.6.16.x kernels (on Xen 3.2.x) worked fine even without the change iirc, and while I recall that I even tried running the older kernel on newer Xen, I''m not entirely sure anymore that the problem was really tied to the heavier I/O port access overhead in newer Xen. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel