lkml.org 
[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] f2fs: use kmem_cache pool during inline xattr lookups
On 03/19, Chao Yu wrote:
> Hi Ju Hyung,
>
> On 2020/3/18 20:14, Ju Hyung Park wrote:
> > Hi Chao.
> >
> > I got the time around to test this patch.
> > The v2 patch seems to work just fine, and the code looks good.
>
> Thanks a lot for the review and test.
>
> >
> > On Tue, Feb 25, 2020 at 7:17 PM Chao Yu <yuchao0@huawei.com> wrote:
> >> diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
> >> index a3360a97e624..e46a10eb0e42 100644
> >> --- a/fs/f2fs/xattr.c
> >> +++ b/fs/f2fs/xattr.c
> >> @@ -23,6 +23,25 @@
> >> #include "xattr.h"
> >> #include "segment.h"
> >>
> >> +static void *xattr_alloc(struct f2fs_sb_info *sbi, int size, bool *is_inline)
> >> +{
> >> + *is_inline = (size == sbi->inline_xattr_slab_size);
> >
> > Would it be meaningless to change this to the following code?
> > if (likely(size == sbi->inline_xattr_slab_size))
> > *is_inline = true;
> > else
> > *is_inline = false;
>
> Yup, I guess it's very rare that user will change inline xattr size via remount,
> so I'm okay with this change.

Applied like this. Thanks,

26 static void *xattr_alloc(struct f2fs_sb_info *sbi, int size, bool *is_inline)
27 {
28 if (likely(size == sbi->inline_xattr_slab_size)) {
29 *is_inline = true;
30 return kmem_cache_zalloc(sbi->inline_xattr_slab, GFP_NOFS);
31 }
32 *is_inline = false;
33 return f2fs_kzalloc(sbi, size, GFP_NOFS);
34 }

>
> Jaegeuk,
>
> Could you please help to update the patch in your git tree directly?
>
> Thanks,
>
> >
> > The above statement seems to be only false during the initial mount
> > and the rest(millions) seems to be always true.
> >
> > Thanks.
> > .
> >

\
 
 \ /
  Last update: 2020-03-23 05:16    [W:0.057 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site