Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp538695rdb; Tue, 15 Aug 2023 04:59:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjNvB3qnIqjfMq523y4+3SsYDDGczA2zXVmvZhH3BT53nO52g0wSROlGo9GewAZWEwr0rw X-Received: by 2002:a17:906:30d7:b0:99c:4ea0:ed18 with SMTP id b23-20020a17090630d700b0099c4ea0ed18mr9619499ejb.8.1692100776918; Tue, 15 Aug 2023 04:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692100776; cv=none; d=google.com; s=arc-20160816; b=HQxSI/muWrMvzX6IhBJl8UyIBbvn3XYkPmGHw0edoYzD4qThbndazNlS7GONECIaqd Gg9N7ddd+J0/oAv07Wc6+p1aV+EEZpPc15Pm4F4w3grBmWP7G0a7YT3StaG75YWist7U AjqO6pt4b5jzv97DZ2b5vsSzQi30GejjN6N/rQdRvk6mMlsI5Nva7ZdY/XdJTJeodGRH SHI+mj73Eilq+cnRwsDlGnL/EXFFnt3dxQjlsN2txprpRc4twyhMSHjZqnNjbvOdLdiz 8ftKdO6btb2OvwEApQlP7XrxDqBtkMchM4UJxs7BGxu501pvTR0K2uFB8SoEb9r3xln3 LekQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Tf+ROFbtG4qm2Uh9DKJYCfTN9VWih0D61+ZGYy3BTwE=; fh=iJ7xRlwy7lJ0xL4Q+T9gyACQci1WjdoFCmE3eTIw118=; b=WA6HEOjUzvtSsBdUqwRYZk2CtINQR4q6NXNiczQS3f8lVV2RYvgIRy2vt9kkOpnmkR IKZgj7IZoNN74UxGRsEDzHprU9fZ2LgoiXjl0k+MLNyECP9+ugyG+wXWW0DYhSTipoNm w3LIML6Nqstw83fyr0BhuN7hDz9ScrcjeHCFFHwizfjCieFpulIkhmyqT5WCYWDfeA4i Jop3YLm5bh9w+yGSugGpMB0QEMdcJnxE6KoKd20oS9vDex+FqpzkEmNoF5LGHHt7ISHG DigD7yoG5aPrVWmMPIys2PDRwAgajVjlDu83hsE0e0IxYUmpWUTs332tz/DKiEPtl8u5 Bq6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lf9-20020a170906ae4900b0099bcb5694b5si9192288ejb.209.2023.08.15.04.59.06; Tue, 15 Aug 2023 04:59:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236224AbjHOJty (ORCPT + 99 others); Tue, 15 Aug 2023 05:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236193AbjHOJtY (ORCPT ); Tue, 15 Aug 2023 05:49:24 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2611E3 for ; Tue, 15 Aug 2023 02:49:21 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=mengferry@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0VprTE8H_1692092956; Received: from j66c13357.sqa.eu95.tbsite.net(mailfrom:mengferry@linux.alibaba.com fp:SMTPD_---0VprTE8H_1692092956) by smtp.aliyun-inc.com; Tue, 15 Aug 2023 17:49:19 +0800 From: Ferry Meng To: linux-erofs@lists.ozlabs.org Cc: LKML , Ferry Meng Subject: [PATCH 2/3] erofs: add necessary kmem_cache_create flags for erofs inode cache Date: Tue, 15 Aug 2023 17:48:48 +0800 Message-Id: <20230815094849.53249-2-mengferry@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20230815094849.53249-1-mengferry@linux.alibaba.com> References: <20230815094849.53249-1-mengferry@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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-kernel@vger.kernel.org To improve memory access efficiency and enable statistics functionality, add SLAB_MEM_SPREAD and SLAB_ACCOUNT flag during erofs_icachep's allocation time. Signed-off-by: Ferry Meng --- fs/erofs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index ae5caf605ffc..82f41d09f8d8 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -937,9 +937,9 @@ static int __init erofs_module_init(void) erofs_check_ondisk_layout_definitions(); erofs_inode_cachep = kmem_cache_create("erofs_inode", - sizeof(struct erofs_inode), 0, - SLAB_RECLAIM_ACCOUNT, - erofs_inode_init_once); + sizeof(struct erofs_inode), 0, + SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD | SLAB_ACCOUNT, + erofs_inode_init_once); if (!erofs_inode_cachep) return -ENOMEM; -- 2.19.1.6.gb485710b