IT! WORKS!
Scott Long
scottl at freebsd.org
Wed Jun 16 10:42:49 GMT 2004
Pyun YongHyeon wrote:
> On Wed, Jun 16, 2004 at 03:23:52AM -0600, Scott Long wrote:
> > Pyun YongHyeon wrote:
> > >On Tue, Jun 15, 2004 at 11:47:27PM -0400, Mykel wrote:
> > > > Ken Smith wrote:
> > >...
> > > >
> > > > Now how about the console? how can I make typing at least practical on
> > > > here? I was hoping to use this as a desktop machine.
> > > >
> > >
> > >Because I got big trouble while testing TCP/UDP cksum offload
> > >fix for hme(4) on console, I touched ofw_console code. I stole
> > >the code from OpenBSD. It seems that now the console works as
> > >expected. No more 1 sec. pause needed to see correct typing on
> > >keyboard. Here is patch. I'm not familiar with tty code, so
> > >it may be just dirty hack or it may not work except my Ultra2.
> > >
> > >Regards,
> > >Pyun YongHyeon
> > >
> >
> > Another nice patch =-) The only question that I have is, is it
> > possible to have more than OFBURSTLEN characters in the outq, and
> > if so, what happens to the extra charaters? Do they just stay in
> > the outq until the next poll cycle? I guess that it's hard to
> I'm sorry I don't know. I just thought OF_write() is too slow,
> it would be more efficient to write at once. So I stole the code
> from OpenBSD.
>
> > get 12,800 keypresses in a second, though. The only other
> > problem that I see is that I remember ofwcons taking up a lot of
> > CPU when the polling cycle is increased. This was several years
> > ago, though, so it might be different now. Have you compared
> > CPU usage with your patch?
> >
> top says "0.5% sys" when I use OFW_POLL_HZ with 100. But when I
> change the value to 20, top said "0.0% sys". With the value 20,
> I had no lost characters on console. So in practice, the OFW_POLL_HZ
> could be set to 20 or less than the value.
> Thank you for pointing out.
>
Look at rev 1.4 of ofw_console.c. It looks like the polling interval
was changed from 50 to 4 in response to poor performance and a certain
lockup potential. Your change to batch the console writes will
undoubtably help this, though.
It would be very intereting to get some testing results from a blade100
and an Ultra5/10 on this. If people with this hardware can test and
report back both whether it helps/hurts and if it had any impact on CPU
load, I'll commit it.
Scott
More information about the freebsd-sparc64
mailing list