Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp19423lqg; Thu, 29 Feb 2024 18:07:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8op3EGrdoo97E5L/+JPeO/JhEQhbZNShw28aaT/+FOIy1Re1kl7gVkyTNR1DpC5T1YtNWMhtyDJ1JRlTPBWCecphtqfSCPIfiIxqeYw== X-Google-Smtp-Source: AGHT+IFZquwvIsk8xspq6486s+gApHnZ31HwI17OZoYex8BAr2uekrOLVnkOEN97vg0bGwNBknI8 X-Received: by 2002:a05:6402:5144:b0:566:b2e1:58f with SMTP id n4-20020a056402514400b00566b2e1058fmr203722edd.41.1709258843393; Thu, 29 Feb 2024 18:07:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709258843; cv=pass; d=google.com; s=arc-20160816; b=nqIifTgXxSLjzvChzyGcNuuWJHQMuNUsOl6UfdHfEUULkP72iYXa3AQ+PF3sl5wJgU IL3+/320CD4wJbeQlHr5IvPbxh9qfJw+bco48piA+VY486eUvTWIE2qNcl/GZkbgTrx6 C2mB2lR2s+H/mrn+MrZLfKsb9kctx/utMxJt8ElBp6kwhzVVOXZByUVTC3fgIKoby61U 6nZhikPpMk5OFTrCxayeBBvnf3KiWxKwz67Ke1p7OnXKNhayq4Eb7RzFQObhqLIGfAjT GKbdbwR/4xM0l9ABZKsVnAstaK3+2FUPKB61CaK+jJIJY40C5RwCL1ZXzSlG+G59Jzqq qVCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=zmWiYCevyAzWDEC9P7lgyWHXIyTz15KEHmRbnonBtRU=; fh=QyfzXf7Qs5lA0EqI3rc7qqRPWAX0pWWG3CC686+a+d8=; b=0co2sggwtYVK9DlPaaq0mVYrdarE56DSdaXlG7kQExH3idNhINOFDbSwHIn8Wno4Lz 4SEdCygH89vicq7VfLaGHitlwYqhdqtw+ddx3nB/fYezbjs/OFwBzaODPqMwi479vgYR Dkke81//nIDcR2qBOeJij4lrPZ+a6ij+7rnflTK69MWgWGK/ifb4LIVwU0YqFgncYYwy SDkrP21r4LDyYaN4Qsoy4hOWrP2zRDCRMi6eJZodeT17kT7oOaPfoMyJwx5a4E0wb98O Ze0Z28BPY7smd/5FlmSDs5eWQw/A9X3gHx/n9QxYwuxsiwuxb3e22vexfKoLaQ6mZpf0 AO/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-87816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87816-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ck28-20020a0564021c1c00b00566c42ef808si326457edb.542.2024.02.29.18.07.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 18:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-87816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87816-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 12C4F1F21A81 for ; Fri, 1 Mar 2024 02:06:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B905F39AFE; Fri, 1 Mar 2024 02:06:29 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0F0A39ACE; Fri, 1 Mar 2024 02:06:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709258789; cv=none; b=ITS57n3gdkR5MClQV0ybJKMQ0EZiMsPHnw7ydnVGSfOCXMGqTt48WD5sxKRm5SJQANrjdFY77BAi5nS+WRASGTjVR/nkz58NnOAfbdEShDpDD+igkU8PZ9rqnZlCOlTTjABtv0WwVuqxbut0jlvR/5Om2ZrfnaSPzmiZKIpy3FI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709258789; c=relaxed/simple; bh=fJAAOCcqK3dYdJ3pSM8aaqXhrQJt3qoqEqGB4cghUIE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ni4G7gS0MZIw/mSC/6kl91/ZrA91lIsjc5kRE75Tdsn1ApL38Frj8T+1/+12L3A1OfDd/C5rgfw4pJS/exkYmvlO66D6dfkZhTPNBrmZLwGiLMa3VS1dhDKmsaGHEVFNFonpzC95tl7tNXZhoNNcIOEeYtF4rStn/WchJZ3ronY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: c989d866796349e792069577c80d5396-20240301 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:e3765211-90fa-4aee-99e5-92fc7f0ccea8,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.37,REQID:e3765211-90fa-4aee-99e5-92fc7f0ccea8,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:6f543d0,CLOUDID:6bdbe08f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:2402292140264UI5XS11,BulkQuantity:5,Recheck:0,SF:44|64|66|38|24|17|1 9|102,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:40,QS:nil,B EC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: c989d866796349e792069577c80d5396-20240301 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 561634308; Fri, 01 Mar 2024 10:06:19 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 5A3E2E000EBC; Fri, 1 Mar 2024 10:06:19 +0800 (CST) X-ns-mid: postfix-65E1381B-294018254 Received: from [172.20.15.254] (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 01990E000EBC; Fri, 1 Mar 2024 10:06:18 +0800 (CST) Message-ID: Date: Fri, 1 Mar 2024 10:06:17 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nfs: use KMEM_CACHE() to create nfs_commit_data cache Content-Language: en-US To: Trond Myklebust , "anna@kernel.org" , "kunwu.chan@linux.dev" Cc: "linux-nfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20240229094112.1154644-1-kunwu.chan@linux.dev> <6a1136c39cc9d8e4ae4800ad81e8e72f3b8b4516.camel@hammerspace.com> From: Kunwu Chan In-Reply-To: <6a1136c39cc9d8e4ae4800ad81e8e72f3b8b4516.camel@hammerspace.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Thanks for the reply. On 2024/2/29 21:40, Trond Myklebust wrote: > On Thu, 2024-02-29 at 17:41 +0800, kunwu.chan@linux.dev wrote: >> From: Kunwu Chan >> >> Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify >> the creation of SLAB caches when the default values are used. >> >> Signed-off-by: Kunwu Chan >> --- >> =C2=A0fs/nfs/write.c | 5 +---- >> =C2=A01 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/fs/nfs/write.c b/fs/nfs/write.c >> index bb79d3a886ae..6a75772d447f 100644 >> --- a/fs/nfs/write.c >> +++ b/fs/nfs/write.c >> @@ -2148,10 +2148,7 @@ int __init nfs_init_writepagecache(void) >> =C2=A0 if (nfs_wdata_mempool =3D=3D NULL) >> =C2=A0 goto out_destroy_write_cache; >> =20 >> - nfs_cdata_cachep =3D kmem_cache_create("nfs_commit_data", >> - =C2=A0=C2=A0=C2=A0=C2=A0 sizeof(struct >> nfs_commit_data), >> - =C2=A0=C2=A0=C2=A0=C2=A0 0, SLAB_HWCACHE_ALIGN, >> - =C2=A0=C2=A0=C2=A0=C2=A0 NULL); >> + nfs_cdata_cachep =3D KMEM_CACHE(nfs_commit_data, >> SLAB_HWCACHE_ALIGN); >> =C2=A0 if (nfs_cdata_cachep =3D=3D NULL) >> =C2=A0 goto out_destroy_write_mempool; >=20 > If this were being done as part of an actual functional code change, > then I'd be OK with it, but otherwise it is just unnecessary churn that > gets in the way of back porting any future fixes. It's just my personal opinion, I meant to do some cleanup. It's not=20 entirely necessary either, as everyone prefers a different style of=20 code. It doesn't matter. >=20 >=20 --=20 Thanks, Kunwu