[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070724160144.GG4074@enneenne.com>
Date: Tue, 24 Jul 2007 18:01:44 +0200
From: Rodolfo Giometti <giometti@...eenne.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] LinuxPPS - definitive version
On Tue, Jul 24, 2007 at 03:52:49PM +0100, David Woodhouse wrote:
>
> Elsewhere in the patch.
Got, thanks.
> Read Documentation/memory-barriers.txt
>
> There is a tiny but possibly non-zero chance that one CPU could be in
> pps_event() and might not yet have 'seen' the change to the .info field.
> Releasing the pps_mutex provides a write-barrier on the CPU which runs
> pps_unregister_source(), but there's no corresponding read-barrier on
> the CPU running pps_event(). You have to be careful about when
> pps_event() is run. It _MUST_ not touch the old info structure after
> pps_unregister_source() has completed.
>
> At the moment, I think it's OK because you won't be calling pps_event()
> at the wrong times. But you do need to make sure that requirement is
> documented. And I think you can remove the whole dummy_info thing
> because it's not necessary.
What about this new solution involving tasklets? The pps_event() now
just records data and then a tasklet do the data management job. :)
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@...eenne.com
Linux Device Driver giometti@...dd.com
Embedded Systems giometti@...ux.it
UNIX programming phone: +39 349 2432127
View attachment "proposed_patch" of type "text/plain" (68781 bytes)
Powered by blists - more mailing lists