Re: [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, maybe we should remove the SLAB_RECLAIM_ACCOUNT flag for static
slab, and 16828088f9e51815 ("ext4: use KMEM_CACHE instead of
kmem_cache_create") have done so. But should we remove
SLAB_RECLAIM_ACCOUNT in this patch or belong to a separate patch?

Eric Biggers <ebiggers@xxxxxxxxxx> 于2022年11月10日周四 02:00写道:
>
> On Wed, Nov 09, 2022 at 07:38:22AM -0800, JunChao Sun wrote:
> > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
> > index 3d21eae267fc..773176e7f9f5 100644
> > --- a/fs/ext4/readpage.c
> > +++ b/fs/ext4/readpage.c
> > @@ -410,9 +410,8 @@ int ext4_mpage_readpages(struct inode *inode,
> >
> >  int __init ext4_init_post_read_processing(void)
> >  {
> > -     bio_post_read_ctx_cache =
> > -             kmem_cache_create("ext4_bio_post_read_ctx",
> > -                               sizeof(struct bio_post_read_ctx), 0, 0, NULL);
> > +     bio_post_read_ctx_cache = KMEM_CACHE(bio_post_read_ctx, SLAB_RECLAIM_ACCOUNT);
> > +
>
> Why use SLAB_RECLAIM_ACCOUNT here?
>
> - Eric




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux