[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: detaching timecounters (patch)
On Tue, Jan 01, 2008 at 05:00:19PM +0100, Joerg Sonnenberger wrote:
> On Mon, Dec 31, 2007 at 12:29:59AM -0600, David Young wrote:
> > I'm writing a device detachment routine for geodecntr(4), which provides
> > a timecounter. I've come up with the attached routine for detaching
> > a timecounter. Is it ok?
> I don't think this is correct, but I have to think about all corner
> cases to tell you the specific problems. One think to keep in mind is
> that time counters are lazily locked at the moment, so you have to make
> sure that no kernel thread was suspended within a timecounter call.
It's safe. There are two problems with MP but neither of those apply to
David's use case:
1. tc_windup() must be serialized.
2. Activity on the tc must cease before it is detached. The obvious methods
for doing that are covered by braindead patents. There is a patent free
method which I hope to implement soon.
Main Index |
Thread Index |