Change WSDISPLAYBURST from OBUFSIZ-1 to OBUFSIZ*4, for a ~15x
improvement in the "cat /usr/share/misc/termcap" benchmark on 486/75 ttwrite queues data for us in OBUFSIZ chunks. If we only consume OBUFSIZ-1 bytes per call to wsdisplaystart(), we're *guaranteed* to fall behind when given maximum-sized reads (which will defer processing the leftovers until ttrstrt gets called, after a timeout) Note that OBUFSIZ*4 may be overkill; OBUFSIZ*3 may be sufficient to get maximal performance; OBUFSIZ*2 resulted in only about a 2.5x performance improvement, but it's 2am and I've done enough tweaking for the night.
This commit is contained in:
parent
358b69935b
commit
95ee03319d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wsdisplay.c,v 1.18 1999/01/26 14:22:14 drochner Exp $ */
|
||||
/* $NetBSD: wsdisplay.c,v 1.19 1999/02/08 07:05:51 sommerfe Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -33,7 +33,7 @@
|
|||
static const char _copyright[] __attribute__ ((unused)) =
|
||||
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
|
||||
static const char _rcsid[] __attribute__ ((unused)) =
|
||||
"$NetBSD: wsdisplay.c,v 1.18 1999/01/26 14:22:14 drochner Exp $";
|
||||
"$NetBSD: wsdisplay.c,v 1.19 1999/02/08 07:05:51 sommerfe Exp $";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -174,7 +174,7 @@ static int wsdisplayparam __P((struct tty *, struct termios *));
|
|||
#define WSDISPLAYSCREEN(dev) (minor(dev) & 0xff)
|
||||
#define ISWSDISPLAYCTL(dev) (WSDISPLAYSCREEN(dev) == 255)
|
||||
#define WSDISPLAYMINOR(unit, screen) (((unit) << 8) | (screen))
|
||||
#define WSDISPLAYBURST (OBUFSIZ - 1)
|
||||
#define WSDISPLAYBURST OBUFSIZ*4
|
||||
|
||||
#define WSSCREEN_HAS_EMULATOR(scr) ((scr)->scr_dconf->wsemul != NULL)
|
||||
#define WSSCREEN_HAS_TTY(scr) ((scr)->scr_tty != NULL)
|
||||
|
|
Loading…
Reference in New Issue