NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-amd64/59361: paging up in less(1) under qemu vga console is slow
The following reply was made to PR port-amd64/59361; it has been noted by GNATS.
From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-amd64/59361: paging up in less(1) under qemu vga console
is slow
Date: Sun, 26 Oct 2025 22:35:24 +0000 (UTC)
On Sat, 26 Apr 2025, campbell+netbsd%mumble.net@localhost wrote:
>> Description:
> Paging _down_ in less(1) under qemu vga console is reasonably quick. Not instantaneous -- I still see a flicker sometimes -- but quick enough.
>
> Paging _up_ in less(1) under qemu vga console is excruciatingly slow, takes multiple seconds to go a single page in a 25x80 display.
>
There are a few workarounds:
Userspace:
----------
1. `export LESS=-c' or run `less -c' to that less(1) repaints rather than scrolls
up from the bottom. (This also works around most, not all, delays in the
`vt100' terminfo entry.)
2. Don't use `-accel nvmm' :(. (TCG, the default accel doesn't seem to suffer
from this.)
Bootloader:
-----------
Force use of VESA:
boot> vesa on
Kernel:
-------
Scrolling up (erasure of 1st line, followed by moving the rest of the lines up)
seems to do a backwards copy. Use plain memmove(3) instead:
```
--- sys/dev/ic/vga.c.orig 2021-08-07 16:19:12.000000000 +0000
+++ sys/dev/ic/vga.c 2025-05-20 04:02:12.133432513 +0000
@@ -544,8 +544,8 @@
&vh->vh_ioh_6845))
panic("vga_init: couldn't map 6845 io");
- if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
- BUS_SPACE_MAP_CACHEABLE, &vh->vh_allmemh))
+ if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
+ BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, &vh->vh_allmemh))
panic("vga_init: couldn't map memory");
if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh,
@@ -1168,10 +1168,15 @@
scr->pcs.cursorrow, scr->pcs.cursorcol);
#endif
} else {
+ bus_space_handle_t dst = memh + scr->pcs.dispoffset + dstoff * 2;
+ bus_space_handle_t src = memh + scr->pcs.dispoffset + srcoff * 2;
+ memmove((void* )dst, (void* )src, nrows * ncols * 2);
+#if 0
bus_space_copy_region_2(memt, memh,
scr->pcs.dispoffset + srcoff * 2,
memh, scr->pcs.dispoffset + dstoff * 2,
nrows * ncols);
+#endif
}
} else
memcpy(&scr->pcs.mem[dstoff], &scr->pcs.mem[srcoff],
```
HTH,
-RVP
Home |
Main Index |
Thread Index |
Old Index