Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 13 November 2007, Nick Piggin wrote:
> On Wednesday 14 November 2007 17:52, David Brownell wrote:
> > On Tuesday 13 November 2007, Andrew Morton wrote:
> 
> > > > I'll highlight the
> > > > point that such bitops shouldn't be preemption points.
> > >
> > > Disagree.  *everything* should be a preemption point.
> >
> > So it's wrong that <asm-generic/bitops/atomic.h> uses the
> > same calls to prevent *those* bitops from being prempted?
> 
> Upstream, all spinlocks prevent preemption.

I chose my wording carefully though.  A preemption point is
more than just a small region where preemption isn't allowed.

It's one of those where preemption is *INVITED* ...

Now, in the RT case, I believe the rationale for inviting
preemption when dropping a lock is largely related to the
way priority inversion is handled.  When lock contention can
block higher priority activities, dropping the lock must
be able to trigger the relevant activity switch.

... and the raw spinlocks don't support that machinery,
while "normal" spinlocks become inversion-aware mutexes.


> But these ones 
> are raw locks rather than normal locks probably because that
> they are trivially an innermost and correct lock.

As in the $SUBJECT case, I'd say.

Although another point is related to "trivial":  the data
is being protected through an operation too trivial to be
worth paying for any of that priority logic.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux