All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Fang <fangwei1@huawei.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: <viro@zeniv.linux.org.uk>, <linux-fsdevel@vger.kernel.org>,
	<akpm@linux-foundation.org>, <jack@suse.com>, <axboe@kernel.dk>,
	<tj@kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v2] fs/dcache.c: avoid soft-lockup in dput()
Date: Wed, 6 Jul 2016 10:36:25 +0800	[thread overview]
Message-ID: <577C6EA9.6050703@huawei.com> (raw)
In-Reply-To: <20160622065128.GB28443@insomnia>

Hi, Boqun,

>> diff --git a/fs/dcache.c b/fs/dcache.c
>> index d5ecc6e..074fc1c 100644
>> --- a/fs/dcache.c
>> +++ b/fs/dcache.c
>> @@ -578,7 +578,7 @@ static struct dentry *dentry_kill(struct dentry *dentry)
>>  
>>  failed:
>>  	spin_unlock(&dentry->d_lock);
>> -	cpu_relax();
>> +	cond_resched();
> 
> Is it better to put the cond_resched() in the caller(i.e. dput()), right
> before "goto repeat"? Because it's obviously a loop there, which makes
> the purpose of cond_resched() more straightforward.

Agreed, that's more reasonable. I'll send v3 soon.

Thanks,
Wei

  reply	other threads:[~2016-07-06  2:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  3:01 [PATCH v2] fs/dcache.c: avoid soft-lockup in dput() Wei Fang
2016-06-22  6:51 ` Boqun Feng
2016-07-06  2:36   ` Wei Fang [this message]
2016-09-16  7:49 ` Vaishali Thakkar
2016-09-16 12:10   ` Al Viro
2016-09-16 12:50     ` Vaishali Thakkar

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=577C6EA9.6050703@huawei.com \
    --to=fangwei1@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=boqun.feng@gmail.com \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.