All of lore.kernel.org
 help / color / mirror / Atom feed
From: He YunLei <heyunlei@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: heyunlei@huwei.com, yuchao@huawei.com,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: no need inc dirty pages under inode lock
Date: Mon, 16 May 2016 09:50:54 +0800	[thread overview]
Message-ID: <5739277E.20707@huawei.com> (raw)
In-Reply-To: <20160513171352.GB27525@jaegeuk.gateway>

Hi, Kim
On 2016/5/14 1:13, Jaegeuk Kim wrote:
> Hi Yunlei,
>
> It's just one atomic operation.
> Are there performance or race condition issues?
>

No race condition issues reported here, but it has no relationship with inode lock, and dec operation
with no this lock. Besides atomic operation, it call set_sbi_flag, maybe it will affect performance

Thanks,

> Thanks,
>
> On Fri, May 13, 2016 at 02:57:43PM +0800, Yunlei He wrote:
>> No need inc dirty pages under inode lock
>>
>> Signed-off-by: Yunlei He <heyunlei@huawei.com>
>> ---
>>   fs/f2fs/checkpoint.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
>> index 6402e93..3da6499 100644
>> --- a/fs/f2fs/checkpoint.c
>> +++ b/fs/f2fs/checkpoint.c
>> @@ -787,9 +787,9 @@ void update_dirty_page(struct inode *inode, struct page *page)
>>
>>   	spin_lock(&sbi->inode_lock[type]);
>>   	__add_dirty_inode(inode, type);
>> -	inode_inc_dirty_pages(inode);
>>   	spin_unlock(&sbi->inode_lock[type]);
>>
>> +	inode_inc_dirty_pages(inode);
>>   	SetPagePrivate(page);
>>   	f2fs_trace_pid(page);
>>   }
>> --
>> 1.9.1
>
> .
>


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j

      reply	other threads:[~2016-05-16  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13  6:57 [PATCH] f2fs: no need inc dirty pages under inode lock Yunlei He
2016-05-13 17:13 ` Jaegeuk Kim
2016-05-16  1:50   ` He YunLei [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=5739277E.20707@huawei.com \
    --to=heyunlei@huawei.com \
    --cc=heyunlei@huwei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=yuchao@huawei.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.