[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] gpsd processor load
From: |
Greg Troxel |
Subject: |
Re: [gpsd-dev] gpsd processor load |
Date: |
Wed, 30 Oct 2013 18:44:41 -0400 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix) |
address@hidden (Eric S. Raymond) writes:
> Looks like you have a NetBSD-specific issue. I've been watching gpsd
> in top for a while and it generally wanders between 0.3%-0.7% of CPU.
> I've never seen it go above 1.3%
>
> Given the time pattern of its inputs, gpsd spends most of every second
> waiting on select(2). ckuethe is right; something likely is awry in
> your select.
Nope, it's not select. I ran ktrace, and the thread that reads from the
device is fine. The pps/shm thred is in a tight loop doing
gettimeofday. The problem is that the loop in gpsd_ppsmonitor has very
little body content if both TIOCMIWAIT and SYS_TIMEPPS are both
undefined. NetBSD has sys/timepps.h, but it needs sys/types.h, so it's
undefined. As I read the code, it will be in an infinite tight loop
calling gettimeofday and then logging a debug message if neither method
is available.
The new code disables pps if TIOCMIWAIT is not present. I'm not sure
that's right, as kpps might be able to work, but I will figure it out
before asking for that to change.
pgpp4S5mDQ0S9.pgp
Description: PGP signature
- [gpsd-dev] gpsd processor load, Eric S. Raymond, 2013/10/30
- Re: [gpsd-dev] gpsd processor load,
Greg Troxel <=
- Re: [gpsd-dev] gpsd processor load, Gary E. Miller, 2013/10/30
- Re: [gpsd-dev] gpsd processor load, Andy Walls, 2013/10/30
- Re: [gpsd-dev] gpsd processor load, HÃ¥kan Johansson, 2013/10/31
- Re: [gpsd-dev] gpsd processor load, Greg Troxel, 2013/10/31
- Re: [gpsd-dev] gpsd processor load, Andy Walls, 2013/10/31
- Re: [gpsd-dev] gpsd processor load, Gary E. Miller, 2013/10/31