Subject: Re: kern/17583: pms0 mouse become almost unusable suddenly
To: None <martin@duskware.de>
From: MOCHIDA Shuji <mochid@netside.co.jp>
List: netbsd-bugs
Date: 07/14/2002 01:02:20
>> Jul 12 22:38:10 ebony /netbsd: pms_input: unusual delay (-1.939320 s),
>> scheduling reset

> This is not possible (tm).
    :
> Anyway, if your port has a broken microtime(9) implementation we should deal
> with that.

 Port is i386. I added DPRINTF() to see sc->current and sc->last.

Jul 14 00:18:35 ebony /netbsd: pms_input: unusual delay (-1.991507 s), scheduling reset
Jul 14 00:18:36 ebony /netbsd:   current: 1026573515.796501
Jul 14 00:18:36 ebony /netbsd:   last:    1026573515.804994
Jul 14 00:18:36 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:18:36 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:18:36 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:19:48 ebony /netbsd: pms_input: unusual delay (0.059425 s), scheduling reset
Jul 14 00:19:49 ebony /netbsd:   current: 1026573588.170529
Jul 14 00:19:49 ebony /netbsd:   last:    1026573588.111104
Jul 14 00:19:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:19:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:19:49 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:19:49 ebony /netbsd: pms_input: unusual delay (0.069578 s), scheduling reset
Jul 14 00:19:49 ebony /netbsd:   current: 1026573588.440497
Jul 14 00:19:49 ebony /netbsd:   last:    1026573588.370919
Jul 14 00:19:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:19:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:19:49 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:19:49 ebony /netbsd: pms_input: unusual delay (-1.937389 s), scheduling reset
Jul 14 00:19:49 ebony /netbsd:   current: 1026573588.687917
Jul 14 00:19:49 ebony /netbsd:   last:    1026573588.750528
Jul 14 00:19:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:19:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:19:49 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:19:49 ebony /netbsd: pms_input: unusual delay (-1.935887 s), scheduling reset
    :
    :


 Is there considerable reason? compiler bug? hardware bug? race condition of
kernel threads?

> Could you try if this patch helps?

> -		if (diff.tv_sec > 0 || diff.tv_usec > 25000) {
> +		if (diff.tv_sec > 0 || (diff.tv_sec >= 0 && diff.tv_usec > 25000)) {

 It still occurs.


Jul 14 00:08:48 ebony /netbsd: pms_input: unusual delay (0.048295 s), scheduling reset
Jul 14 00:08:49 ebony /netbsd:   current: 1026572928.139265
Jul 14 00:08:49 ebony /netbsd:   last:    1026572928.090970
Jul 14 00:08:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:08:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:08:49 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:08:49 ebony /netbsd: pms_input: unusual delay (0.052421 s), scheduling reset
Jul 14 00:08:49 ebony /netbsd:   current: 1026572928.315525
Jul 14 00:08:49 ebony /netbsd:   last:    1026572928.263104
Jul 14 00:08:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:08:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:08:49 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:08:49 ebony /netbsd: pms_input: unusual delay (0.059189 s), scheduling reset
Jul 14 00:08:49 ebony /netbsd:   current: 1026572928.515530
Jul 14 00:08:49 ebony /netbsd:   last:    1026572928.456341
Jul 14 00:08:49 ebony /netbsd: pms0: resetting mouse interface
Jul 14 00:08:49 ebony /netbsd: pms_protocol: standard PS/2 protocol (no scroll wheel)
Jul 14 00:08:50 ebony /netbsd: pms_enable: using no scroll wheel (3 buttons) protocol
Jul 14 00:08:50 ebony /netbsd: pms_input: unusual delay (0.052421 s), scheduling reset


 After that, I increased usec threshold 25000 to 100000, then I haven't 
see this trouble yet, for about 30min.

 But, why this reset repeats?

-mochid