[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] 3.10 release objectives
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] 3.10 release objectives |
Date: |
Thu, 17 Oct 2013 06:01:56 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Gary E. Miller <address@hidden>:
> > It is a race between dropping root and
> > reading /dev/pps0 which only root can read. So it is likely very
> > dependent on the number of cores you have.
>
> I added code to catch when the race fails. It announces the failure
> and then adds some sanity checks to fail gracefuly. I also found
> some logic errors adding during some previous refactoring.
I've added a thread-locked semaphore that should prevent this race.
Just before privilege dropping the code stalls until either there
are no KPPS threads in an uninitialized state or a long timeout
expires.
Please review and test; I don't seem to have kernel PPS, so I can't.
> I want to sleep on this a bit and see what else I can improve, but at
> least it works a lot better now.
I think my fix solves your one race condition. But there's a more
general problem with kernel PPS vs. hotplugging which, now that the
GR-601W exists, is no longer purely theoretical.
I'm going to run some tests here and then post about it.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
signature.asc
Description: Digital signature
- [gpsd-dev] 3.10 release objectives, Eric S. Raymond, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Gary E. Miller, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Eric S. Raymond, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Gary E. Miller, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Greg Troxel, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Eric S. Raymond, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Gary E. Miller, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives, Gary E. Miller, 2013/10/16
- Re: [gpsd-dev] 3.10 release objectives,
Eric S. Raymond <=
Re: [gpsd-dev] 3.10 release objectives, Andy Walls, 2013/10/16