Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Gu Zheng
Hi Chao, On 09/12/2013 10:40 AM, 俞超 wrote: > Hi Gu > >> -Original Message- >> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] >> Sent: Wednesday, September 11, 2013 1:38 PM >> To: jaegeuk@samsung.com >> Cc: chao2...@samsung.com; shu@samsung.com; >> linux-fsde...@vger.kernel.org; l

[f2fs-dev] [PATCH V2] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Gu Zheng
From: Yu Chao There is a performance problem: when all sbi->fs_lock are holded, then all the following threads may get the same next_lock value from sbi->next_lock_num in function mutex_lock_op, and wait for the same lock(fs_lock[next_lock]), it may cause performance reduce. So we move the sbi->

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread 俞超
Hi Gu > -Original Message- > From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com] > Sent: Wednesday, September 11, 2013 1:38 PM > To: jaegeuk@samsung.com > Cc: chao2...@samsung.com; shu@samsung.com; > linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread 俞超
Hi Kim > -Original Message- > From: Kim Jaegeuk [mailto:jaegeuk@gmail.com] > Sent: Wednesday, September 11, 2013 9:15 PM > To: chao2...@samsung.com > Cc: ???; 谭姝; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: Re: [f

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Jin Xu
Hi, On 11/09/2013 21:19, Kim Jaegeuk wrote: > Hi Russ, > > The usage of fs_locks is for the recovery, so it doesn't matter > with stress-testing. > Actually what I've concerned is that we should not grab two or > more fs_locks in the same call path. > Thanks, > I am wondering why we don't use oth

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Russ Knize
Jaegeuk, My tests include forced kernel panics while fsstress is running, which generates a lot of recovery activity. Sorry I wasn't more clear. I understand your concern, which is why I first tried to keep the fs_lock in the xattr_handler->set() path from VFS while removing it from the call pat

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Kim Jaegeuk
Hi Gu, 2013/9/11 Gu Zheng : > Hi Jaegeuk, Chao, > > On 09/10/2013 08:52 AM, Jaegeuk Kim wrote: > >> Hi, >> >> At first, thank you for the report and please follow the email writing >> rules. :) >> >> Anyway, I agree to the below issue. >> One thing that I can think of is that we don't need to use

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Kim Jaegeuk
Hi Russ, The usage of fs_locks is for the recovery, so it doesn't matter with stress-testing. Actually what I've concerned is that we should not grab two or more fs_locks in the same call path. Thanks, 2013/9/11 Russ Knize : > Hi Jaegeuk/Gu, > > I've removed the lock and have been stress-testing

Re: [f2fs-dev] [PATCH] f2fs: optimize fs_lock for better performance

2013-09-11 Thread Kim Jaegeuk
Hi, 2013/9/11 Chao Yu > > Hi Kim, > > I did some tests as you mention of using random instead of spin_lock. > The test model is as following: > eight threads race to grab one of eight locks for one thousand times, > and I used four methods to generate lock num: > > 1.atomic_add_return(1, &sbi->ne