Port-sparc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD/sparc running on qemu
> > I tried it, it doesn't change behavior.
> >
> > The difference in timecounter wouldn't understand the difference in
> > behavior:
> > on a i386 guest, sleep(10) takes 20s, and date says it took 20s
> > on a sparc guest, sleep(10) takes 20s, and date says it took 10s
>
> Ah, I thought sleep used hardclock(9), but I was wrong.
>
> I'll try to build the latest pkgsrc/emulators/qemu to test it.
> (current qemu-system-sparc I have dumps core right after mountroot)
qemu-system-sparc still dumps core,
but I test it on qemu (emulating i386).
nanosleep(2) in kern_time.c still uses tstohz() and kpause(9),
and I think kpause(9) depends on hz(9). On sparc, timer0 at obio0
is used not only for timecounter(9) but also for hz(9),
so they show the same count.
On i386, it uses ACPI-Safe for timercounter(9) but hz(9) uses
a different source so they show different count, I guess.
---
# uname -mrs
NetBSD 5.0.1 i386
# sysctl kern.timecounter.hardware
kern.timecounter.hardware = ACPI-Safe
# date;sleep 10;date
Sun Jan 17 02:20:52 JST 2010
Sun Jan 17 02:21:12 JST 2010
# sysctl -w kern.timecounter.hardware=clockinterrupt
kern.timecounter.hardware: ACPI-Safe -> clockinterrupt
# date;sleep 10;date
Sun Jan 17 02:22:04 JST 2010
Sun Jan 17 02:22:14 JST 2010
#
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index