On Tue, 2005-04-26 at 05:04 -0700, Andrew Morton wrote:
> Nick Piggin <[email protected]> wrote:
> >
> > Looks like locking can be optimised quite a lot.
>
> So I've peered suspiciously at the ->lo_pending handling for some time and
> am unconvinced. Are you sure that the error path in loop_make_request() is
> correct? The old code decremented the pending count in there.
>
Pretty sure it is correct. I'm usually wrong though :P
It decremented lo_pending because it had previously incremented it.
We do away with that and do that under a single critical section,
with the increment done _after_ all error checking. So...
> Why do we need that nasty-looking `pending' local in loop_thread()?
Don't I guess, no. If it reaches zero at any stage then that's
where it should stay. So I think you can just read lo_pending.
Nick
--
SUSE Labs, Novell Inc.
-
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]