Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-11 Thread Jaegeuk Kim
On 11/10, Chao Yu wrote: > On 2020/11/10 12:19, Jaegeuk Kim wrote: > > On 11/10, Chao Yu wrote: > > > On 2020/11/10 1:00, Jaegeuk Kim wrote: > > > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting > > > > in > > > > > > I didn't get the problem clearly, did you mean __coun

Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Chao Yu
On 2020/11/10 12:19, Jaegeuk Kim wrote: On 11/10, Chao Yu wrote: On 2020/11/10 1:00, Jaegeuk Kim wrote: Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in I didn't get the problem clearly, did you mean __count_nat_entries() will give the wrong shrink count due to race

Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Jaegeuk Kim
On 11/10, Chao Yu wrote: > On 2020/11/10 1:00, Jaegeuk Kim wrote: > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > > I didn't get the problem clearly, did you mean __count_nat_entries() will > give the wrong shrink count due to race condition? should there be a lock

Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Chao Yu
On 2020/11/10 1:00, Jaegeuk Kim wrote: Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in I didn't get the problem clearly, did you mean __count_nat_entries() will give the wrong shrink count due to race condition? should there be a lock while reading these two variables

[PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Jaegeuk Kim
Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in wrong do_shinker work. Basically the two counts should not happen like that. So, I suspect this race condtion where: - f2fs_try_to_free_nats__flush_nat_entry_set nat_cnt=2, dirty_nat_cnt=2