Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp911654rwb; Wed, 9 Nov 2022 10:06:49 -0800 (PST) X-Google-Smtp-Source: AMsMyM4EaxdsEG9wncSRu1xdHCLqmWk7tH/zE7o2LUa86eC/QLbIgGP5x1uthhNcsiuSEZ/bdg7C X-Received: by 2002:a17:90a:4e85:b0:213:13f2:162b with SMTP id o5-20020a17090a4e8500b0021313f2162bmr63747413pjh.228.1668017208989; Wed, 09 Nov 2022 10:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668017208; cv=none; d=google.com; s=arc-20160816; b=I1ztcFLu/AAEIOXQDWnmxr2WIqflDxIUIbVJvJBVDyVGguJG3FbtGspPGIQ/FjAcSm w9lZgKkRiwkDHT9FTCp352fu3yAJK8a9MDJYkvmJPprl6pGJ4DxjkiVTQIp8uIrWfrGk drDbkhrv94E8/KGoWAdmFash4v3Vt4u+4kRsNFPNPe5gCuvoyxW33SWbFpd7ZJyyg+e9 YYlCt+pR5WiazapkkS9fjB5CQ2f2OSZ36JG5fIJav7ps43hA8tZYo5pC5l3ida7xf/83 QVDak0+7amEmE289OdCKVHKZORQpDN/aFb8jG3wals4o4e4jGOHR1n4qt3cN2J+RJkgf HdkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Er1kSMtBBYVyqVud+dgt8Z2RwMYSTrwFwKbFxvSHdec=; b=DwuaqfOKJOxJCgmLM+HMvkLUi+4kQBUkkDpI3AWLVCy/6Shg6tC6zP+34i70wNrReY hjgnoSgrRzKEuBNwZXidmcU7rE6aHPOXzHi6rQKmk/g1zoSBhZHByW8EAu909U/EGFCc ry7ORyEtO3uniwevMMkifhIupzttPDTfnPGhgN6UFtaQ7Fz55poWzpu+PY9CaKU9JGzQ MzLbeTk88Un1bVskqU124FHRf8LHQd3pLFPm/Kq9mhhYqOg5s98m99PAaZt6KkR5ld/s iRZHOelV5nhZW5B/mUy0f0bb9FnL1SvHG1XfYK0nyWjPyEwhIrwxpl1tD/7ourTYRwXE XiFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oAvyHDuO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x33-20020a056a0018a100b00562a956d979si20186564pfh.67.2022.11.09.10.06.31; Wed, 09 Nov 2022 10:06:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oAvyHDuO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbiKISCY (ORCPT + 99 others); Wed, 9 Nov 2022 13:02:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbiKISCQ (ORCPT ); Wed, 9 Nov 2022 13:02:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84E31F63C for ; Wed, 9 Nov 2022 10:00:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4092461C30 for ; Wed, 9 Nov 2022 18:00:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70B4AC433C1; Wed, 9 Nov 2022 18:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668016821; bh=3fjs/UduqOFWRU0spzpkLAbFTrtn0rgPj88m+pW8IXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oAvyHDuOKANzRis57DCHN2VHpVQGQ+GNGpclN9l07LcUNT9wiXlSbBvTh+ehArVhK LjsxfpxcYJzJHW+i89APBb+k2irJxMmPIvE2CqajYZC7T8RjqoSRdOeZ2JGk6zPqWY TUKO+Pz1ZG+R662rMcqheiymmWjnmedPOLekE2FU8xva/rRYHpW0FIilywJYE4AeMv pJiSvPaXa4hXw6gsWl0QXhGy2xPmCGR45ghTxIjQs+gpXByIl2Pm9DVRJolbUPxCzw se6mmG9HUqHqR+eNM51Fu+bZRjP9nrwyCF3cklwlO3/luVZ5LiIbkDS+qxOhFETCFB I98GOqcWRaN/A== Date: Wed, 9 Nov 2022 10:00:19 -0800 From: Eric Biggers To: JunChao Sun Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz Subject: Re: [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE Message-ID: References: <20221109153822.80250-1-sunjunchao2870@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221109153822.80250-1-sunjunchao2870@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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