Re: Cache coherency... and locking

From: Oliver Xymoron (oxymoron@waste.org)
Date: Fri Jul 21 2000 - 19:18:27 EST


On Sat, 22 Jul 2000, Keith Owens wrote:

> On Fri, 21 Jul 2000 09:21:47 -0700,
> "Linda Walsh" <law@sgi.com> wrote:
> >So it sounds like the safest way to do things is to use a spinlock on a per-process
> >basis -- which should almost never fail resulting in mininal overhead. If I want
> >to globally turn audit on/off, I need to lock the task struct and walk through
> >it setting audit on/off flags to allowed values. The thing that is a pain is
> >that the auditmask is 256 bytes long or a full cache line.
>
> If the data is in task struct *and* you only update it in response to
> requests from the current task then you do not need any locks, the fact
> that you are running under the current task is enough. But if you want
> to update audit flags in one task from another task's context or from
> interrupt then you need a lock.

It might be possible to have the process get SIGSTOPed so that it can't
proceed while the change is taking place.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:17 EST