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

Manuel Bouyer <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
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 <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.