tech-kern archive

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

Re: patch review: avoid com delay() in VMs



On Fri, Feb 07, 2025 at 09:21:49AM +0100, Martin Husemann wrote:
> On Fri, Feb 07, 2025 at 09:18:15AM +0100, Manuel Bouyer wrote:
> > timo looks way too low to me.
> > On a multi-gHz CPU, counting from 10000 to 0 doens't even let you send
> > one byte at 9600bds.
> 
> The CSR_READ_1() is an io port access, so on real hardware this should cause
> significant delays in each iteration.

On modern x86 I'm not sure how fast it is. Anyway, implementing the timeout
only relying on register read speed doesn't look good enough to me (or at
last we must start counting from a much higher value)

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index