From: Coywolf Qi Hunt <qiyong@fc-cn.com>
To: Neil Brown <neilb@suse.de>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: [patch 1/2] raid6_end_write_request() spinlock fix
Date: Tue, 25 Apr 2006 16:07:31 +0800 [thread overview]
Message-ID: <20060425080731.GA31828@localhost.localdomain> (raw)
In-Reply-To: <17485.50850.9186.130696@cse.unsw.edu.au>
On Tue, Apr 25, 2006 at 04:50:10PM +1000, Neil Brown wrote:
> On Tuesday April 25, qiyong@fc-cn.com wrote:
> > On Tue, Apr 25, 2006 at 03:13:49PM +1000, Neil Brown wrote:
> > > On Tuesday April 25, qiyong@fc-cn.com wrote:
> > > > Hello,
> > > >
> > > > Reduce the raid6_end_write_request() spinlock window.
> > >
> > > Andrew: please don't include these in -mm. This one and the
> > > corresponding raid5 are wrong, and I'm not sure yet the unplug_device
> > > changes.
> >
> > I am sure with the unplug_device. Just look follow the path...
> >
>
> What path? There are probably several. If I follow the path, will I
> see the same things as you see? Who knows, because you haven't
> bothered to tell us what you see.
There are only two places where handle_list is possibly re-filled:
__release_stripe() and raidX_activate_delayed(). So raidXd should only
wakeup after these two points.
>
> >
> > Yes. Let's fix the error(). In any case, the current code is broken. (see raid5/6_end_read_request)
>
> What will I see in raidX_end_read_request. Surely it isn't that hard
> to write a few more sentences?
You should see md_error() in raidX_end_read_request isn't in any spinlocks.
> conf->working_disks isn't atomic_t and so decrementing without a
> spinlock isn't safe. So lets just leave it all inside a spinlock.
test_and_set_bit(Faulty, &rdev->flags) protects it as well imho.
It can be enter only once.
>
> Also I have a vague memory that clearing In_sync before Faulty is
> important, but I'm not certain of that.
Maybe, but seems not apply here.
>
> Remember: the code is there for a reason. It might not be a good
> reason, and the code could well be wrong. But it would be worth your
> effort trying to find out what the reason is before blithely changing
> it (as I discovered recently with a change I suggested to
> invalidate_mapping_pages).
Thanks :)
--
Coywolf Qi Hunt
prev parent reply other threads:[~2006-04-25 8:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 3:35 [patch 1/2] raid6_end_write_request() spinlock fix Coywolf Qi Hunt
2006-04-25 5:13 ` Neil Brown
2006-04-25 6:43 ` Coywolf Qi Hunt
2006-04-25 6:50 ` Neil Brown
2006-04-25 8:07 ` Coywolf Qi Hunt [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=20060425080731.GA31828@localhost.localdomain \
--to=qiyong@fc-cn.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).