mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: axboe@suse.de, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] optimise loop driver a bit
Date: Tue, 26 Apr 2005 22:12:47 +1000	[thread overview]
Message-ID: <1114517567.5097.30.camel@npiggin-nld.site> (raw)
In-Reply-To: <20050426050429.69137417.akpm@osdl.org>

On Tue, 2005-04-26 at 05:04 -0700, Andrew Morton wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> 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.



      reply	other threads:[~2005-04-26 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-25  3:58 Nick Piggin
2005-04-26 12:04 ` Andrew Morton
2005-04-26 12:12   ` Nick Piggin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1114517567.5097.30.camel@npiggin-nld.site \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®