From: Shaohua Li <shli@kernel.org>
To: Zhengyuan Liu <liuzhengyuang521@gmail.com>
Cc: linux-raid@vger.kernel.org, 刘云 <liuyun01@kylinos.cn>,
胡海 <huhai@kylinos.cn>
Subject: Re: [PATCH] raid5: fix incorrectly counter of conf->empty_inactive_list_nr
Date: Wed, 27 Jul 2016 17:19:10 -0700 [thread overview]
Message-ID: <20160728001910.GA11266@kernel.org> (raw)
In-Reply-To: <CAOOPZo5B8EF0C3+Yg1WVYJx_jerR6zjNjbixpHhvQx4zOJqvxw@mail.gmail.com>
On Wed, Jul 20, 2016 at 05:22:00PM +0800, Zhengyuan Liu wrote:
> The counter conf->empty_inactive_list_nr is only used for determine if
> the raid5 is congested which is deal with in function
> raid5_congested(). It was increased in get_free_stripe() when
> conf->inactive_list got emptied and decreased in
> release_inactive_stripe_list() when splice temp_inactive_list to
> conf->inactive_list. However, this could cause to problem when
> raid5_get_active_stripe was called, this function may call
> list_del_init(&sh->lru) to delete sh from "conf->inactive_list +
> hash" which may cause "conf->inactive_list + hash" to be empty when
> atomic_inc_not_zero(&sh->count) got false.
> I have found conf->empty_inactive_list_nr to be negative number
> during my random test.
> Is there anything out of my thinking?
Good catch! I think you are right, we get a stripe from inactive list and
should decrement the count. Also we should do the same thing for
stripe_add_to_batch_list. Please resend the patch with proper format, see
Documentation/email-clients.txt
Thanks,
Shaohua
next prev parent reply other threads:[~2016-07-28 0:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 9:22 [PATCH] raid5: fix incorrectly counter of conf->empty_inactive_list_nr Zhengyuan Liu
2016-07-28 0:19 ` Shaohua Li [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-28 6:22 ZhengYuan Liu
2016-07-30 21:02 ` Shaohua Li
2016-08-03 0:44 ` NeilBrown
2016-08-03 0:44 ` NeilBrown
2016-08-03 5:51 liuzhengyuan
2016-08-03 22:44 ` NeilBrown
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=20160728001910.GA11266@kernel.org \
--to=shli@kernel.org \
--cc=huhai@kylinos.cn \
--cc=linux-raid@vger.kernel.org \
--cc=liuyun01@kylinos.cn \
--cc=liuzhengyuang521@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.