Message ID | 20220228122126.37293-8-songmuchun@bytedance.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5743C433F5 for <linux-mm@archiver.kernel.org>; Mon, 28 Feb 2022 12:23:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E5A18D000A; Mon, 28 Feb 2022 07:23:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 76EC28D0001; Mon, 28 Feb 2022 07:23:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60F268D000A; Mon, 28 Feb 2022 07:23:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 4C7CD8D0001 for <linux-mm@kvack.org>; Mon, 28 Feb 2022 07:23:18 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0E9BD2342E for <linux-mm@kvack.org>; Mon, 28 Feb 2022 12:23:18 +0000 (UTC) X-FDA: 79192103676.06.F561F30 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf30.hostedemail.com (Postfix) with ESMTP id A25BA8000B for <linux-mm@kvack.org>; Mon, 28 Feb 2022 12:23:17 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id gb21so10967718pjb.5 for <linux-mm@kvack.org>; Mon, 28 Feb 2022 04:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3CsekL525kd4wMUq3hGH48YYiOw10AxsnYHSRiavRRo=; b=yWb0o30Ai7jt2ic9aWpnmT0w6NOd++UYjPe4/U84uEfZ4Yi+dBC0OL9YaYP0QDWrod 9S+z16kZh3BplAN3pFakq2BGTolIjPo9Lt/XyrYHdTnDcbNQnRQH9Yp/Q59ikL6eGeFK 1ToP4tWaSgcD2SSmZuXcyjqtjf6qI5+uGQo4TjkT2REeZ+EYjQdcH9YZcm9ZfdAML+A/ HihZUnPVgpAr0P5UzPoK8MZfq38wH/2HORkBwF92tUJcmlqe1tlMJYVnoHH1YJVNVIF8 r2sMqsZMli/jOXygwlCZVLWU3lXaZ8PVWgjqzW1rrLElxuBjdOHU/h7JDB570GKrNzwo ZTmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3CsekL525kd4wMUq3hGH48YYiOw10AxsnYHSRiavRRo=; b=ZKkxrEi9ugopBtP/hy/QD0dANvl9R9d+NhwNsVTqCXEIjr2z+LE4dpMZDhkgTZmLNu h50bHz7a/q4zZa4OZlZFJntMIoei9Gmfuj813Wfn8Xhe7K3+Kls39q8zp1Xqc3FUWu12 4tro/iPoPbh8oKi34NRX1Z1oR8/1/RV8eEAo6J/jvHq5t6gmZlfWnkVOOLTWTevCaphH YMMHT0+gFfoFUwqNYSStpSbgPQOphhobFmOOSz+EEmtCWyJmyZa9QMyPJgqAUw7Dp0eD NfGl1+OXHx3XzPQTdwGPuHWZeN5zqy5G8DZV2OvVhe4gAhxhby0uVPzbvZFsjpZbKFTu XFIA== X-Gm-Message-State: AOAM532dzw/Ztj92g4nLfVHqK5I6TqCXdNSql1fRfvJP3CqvucaWujRg KmEOFj3UoZ4gkocgzPPy8LPG0g== X-Google-Smtp-Source: ABdhPJz2mJtVFcGCpLkGoeKpHWerUiwrRW/dint6TVNOtnn8bqEp9SVeaF46LPLwo1CJnR1wfgQ1LQ== X-Received: by 2002:a17:90a:bb0d:b0:1bd:3baf:c8b4 with SMTP id u13-20020a17090abb0d00b001bd3bafc8b4mr6631856pjr.15.1646050996207; Mon, 28 Feb 2022 04:23:16 -0800 (PST) Received: from FVFYT0MHHV2J.tiktokcdn.com ([139.177.225.227]) by smtp.gmail.com with ESMTPSA id ep22-20020a17090ae65600b001b92477db10sm10466753pjb.29.2022.02.28.04.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 04:23:15 -0800 (PST) From: Muchun Song <songmuchun@bytedance.com> To: willy@infradead.org, akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, shakeelb@google.com, roman.gushchin@linux.dev, shy828301@gmail.com, alexs@kernel.org, richard.weiyang@gmail.com, david@fromorbit.com, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, jaegeuk@kernel.org, chao@kernel.org, kari.argillander@gmail.com, vbabka@suse.cz Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, zhengqi.arch@bytedance.com, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, smuchun@gmail.com, Muchun Song <songmuchun@bytedance.com> Subject: [PATCH v6 07/16] mm: dcache: use kmem_cache_alloc_lru() to allocate dentry Date: Mon, 28 Feb 2022 20:21:17 +0800 Message-Id: <20220228122126.37293-8-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220228122126.37293-1-songmuchun@bytedance.com> References: <20220228122126.37293-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A25BA8000B X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=yWb0o30A; spf=pass (imf30.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.216.47 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-Stat-Signature: g5ibaqeutw5gekhmx7dune8hoa3ohzbo X-HE-Tag: 1646050997-680061 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Optimize list lru memory consumption
|
expand
|
diff --git a/fs/dcache.c b/fs/dcache.c index c84269c6e8bf..93f4f5ee07bf 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1766,7 +1766,8 @@ static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name) char *dname; int err; - dentry = kmem_cache_alloc(dentry_cache, GFP_KERNEL); + dentry = kmem_cache_alloc_lru(dentry_cache, &sb->s_dentry_lru, + GFP_KERNEL); if (!dentry) return NULL;