Re: 2.4.18 Preempt Freezeups

From: yodaiken@fsmlabs.com
Date: Sat Mar 16 2002 - 20:54:21 EST


On Sun, Mar 17, 2002 at 02:14:14AM +0100, Daniel Phillips wrote:
> On March 17, 2002 02:13 am, yodaiken@fsmlabs.com wrote:
> > On Sun, Mar 17, 2002 at 01:33:04AM +0100, Daniel Phillips wrote:
> > > On March 16, 2002 01:40 am, yodaiken@fsmlabs.com wrote:
> > > >
> > > > Without preempt:
> > > > x = movefrom processor register;
> > // if preemption is on, we can be preempted and restart
> > // on another processor so x will be wrong
> > > > do_something with x
> > > >
> > > > is safe in SMP
> > > > With [preempt] it requires a lock.
> > >
> > > It must be a trick question. Why would it?
> >
> > See comment.
>
> Which processor register were you thinking of? Surely not anything in the
> general register set, and otherwise, it's just another example of per-cpu
> data. It needs to be protected, and the protection is lightweight.

So what didn't you understand? Your (dubious)
assertion that the lock is "lightweight"
has absolutely no bearing on whether a lock is needed or not.

>
> --
> Daniel

-- 
---------------------------------------------------------
Victor Yodaiken 
Finite State Machine Labs: The RTLinux Company.
 www.fsmlabs.com  www.rtlinux.com

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



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:13 EST