Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp59075rwb; Wed, 9 Nov 2022 19:55:58 -0800 (PST) X-Google-Smtp-Source: AMsMyM7eB3l1ft59u6dMjvRLeqptehQ6hZzVIx3udRSnEFYX9yXOKuVUQcuOQNquRamiaZTvielx X-Received: by 2002:a63:2cc2:0:b0:41c:681d:60d2 with SMTP id s185-20020a632cc2000000b0041c681d60d2mr52292260pgs.502.1668052557744; Wed, 09 Nov 2022 19:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668052557; cv=none; d=google.com; s=arc-20160816; b=NyWtYbH6AswEDoRr4jPrVHH2Jdb6Gz13HIOKOAwsohQYWlwL2NhbwxUEAKE8yQ/vEq l73pi6tVdfKvkWhl0r57GxtooRxJ8BonGD6GBrX52XwbnCkqI5iKutGYijj8aVmtNHET 2j43Z8H+S+BJ0zuFDo1Qy962rwGI2KM8bO+/Bs0xPpbyaUIj23NqI6OqjhCNed8uiJX8 +bNrZX8inSdsQR7uolpgvrtiUTX8Vr2Mygy5xzHqDbVin4DzvIaDZlSe5o0arWiIPUKl ZmXzSwa7yuT52HztienxGNmCm2MmU8YNblksBkPTnJs9mp75DT98vY1yltGakdw0lqZa eINQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Y8WZId2TSw8RaIvDs4tBpdJxhCKXLMLpxZx8dLOEdOc=; b=V5rlMYvQF+vR1NMovhliUztUZ2UYKb59XKOB1Qh+nhJ6Dj3X0CbaDBKYT+MdleHNBA TXZ+AwTZBKPSJI5phVH9GFswRKczv1z5S8OS+W85ur/brnDITyj4IplmvEHYZxtBznZ4 /xF7iV0vgaCF/V2r58d9KlfmaSdyoFIBTF0sJNux8bauqKBzVAy7VHewC6DS+EHu7NAX s2iaKVzYzcjSotS2H4oazUt4mdCtqlFIy9R8nVv4MH+IJLNPURb7TkNLUWxeXTFs74bw Zp2nRgDJ8taMh0dDass7HeEVBk/cKTmnAZUWNbra5l/DCV6nCIoWi6CRAEStH20OdLpz aVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DvTzljAh; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a631817000000b00470422252c7si20725681pgl.122.2022.11.09.19.55.44; Wed, 09 Nov 2022 19:55:57 -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=@gmail.com header.s=20210112 header.b=DvTzljAh; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231863AbiKJDoY (ORCPT + 99 others); Wed, 9 Nov 2022 22:44:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbiKJDoX (ORCPT ); Wed, 9 Nov 2022 22:44:23 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86242C77E for ; Wed, 9 Nov 2022 19:44:22 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id q9so2054013ejd.0 for ; Wed, 09 Nov 2022 19:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y8WZId2TSw8RaIvDs4tBpdJxhCKXLMLpxZx8dLOEdOc=; b=DvTzljAhZY8F7i11zs5ZdiEGjjq1vTow1ed31jnFHIvoZVCcKL6wL6TMJpf1sIvgNW yUEKLejvIUMUKT8hDVSFhSTy4wYbM2gNiKm+N3iYdShzLhAbEbCc2aUz5PFNbU5FTtmb lHpjjJwHZU7sXxgqjd3lXN9oEB+YeEmbTIemlfqL4MHYigDelRBeRHg7NEixHkwtINtj xjHW3Wivzyr9NPhw4pr+rJ6Y2E+xF6IbuMMVP5EUDKv2DdQxiOU0+/PDcjm/e4IHv5Z5 o8IuFUB1nIY4Jr8j7NNRlx+5BnBdy5CTUK+23QEYrYWz00YOy0pNRGpebS5dn9TLeFqV XdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y8WZId2TSw8RaIvDs4tBpdJxhCKXLMLpxZx8dLOEdOc=; b=Vtre3/AQas4qxUYtoVwv8BDGOpwxTdLdtP3Y0ulIhDLsxnKc4JfYMJg1VPIH9KBkfy MsE50ZoR6PJ+m/T5mzEf1Apb+rFJpZFFLaShh7EMMRLeu6jrmSnTP2NIh/WcJBJ6Xf4U rpLMu8XUyXz2/+zKyO/+BL/67dN9vez1M2z9tJusga3lvx0yepoZkeZ48yCpzJYgBfCC i2NzL1OP1PMiLvC0bzmbD305y+MAGk02EDChCMPsPxjhyo7WSbfnQYaQxzcBYKIU98fY dV80gPdAvV1HEVyJeGbM4JBUkpf3fQ9a+xeh2Zchqpba1piC0/WoJVXJtJeeNPo8YIDb DA8g== X-Gm-Message-State: ACrzQf2HK57pQtvtBxls82Lg+//vNMrPJGUX5sBhG9AkQnpMYmkc38NX ToqjbxD/1lICdsYqgX8D0EyUHpu2JeFkbUOYyZDiKP3wvJ0qIw== X-Received: by 2002:a17:907:2bd1:b0:7ae:41e1:cdfa with SMTP id gv17-20020a1709072bd100b007ae41e1cdfamr24937130ejc.618.1668051861059; Wed, 09 Nov 2022 19:44:21 -0800 (PST) MIME-Version: 1.0 References: <20221109153822.80250-1-sunjunchao2870@gmail.com> In-Reply-To: From: JunChao Sun Date: Thu, 10 Nov 2022 11:44:08 +0800 Message-ID: Subject: Re: [PATCH] ext4: replace kmem_cache_create with KMEM_CACHE To: Eric Biggers Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Eric Biggers =E4=BA=8E2022=E5=B9=B411=E6=9C=8810=E6= =97=A5=E5=91=A8=E5=9B=9B 10:47=E5=86=99=E9=81=93=EF=BC=9A > > On Thu, Nov 10, 2022 at 08:53:26AM +0800, JunChao Sun wrote: > > 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? > > > > I'd just keep the slab flags the same in this patch. If any flags do n= eed to be > > changed, that should be a separate patch. > > > > I think SLAB_RECLAIM_ACCOUNT is meant for for things that are directly > > reclaimable, such as struct ext4_inode_info. Inodes are evictable, and= when > > that happens, the corresponding struct ext4_inode_info gets freed. > > > > bio_post_read_ctx_cache probably should use SLAB_TEMPORARY instead, sin= ce it is > > only used for temporary structures during I/O. > > > > That being said, SLAB_TEMPORARY is currently #define'd to SLAB_RECLAIM_= ACCOUNT, > > so currently it makes no difference in practice... Thanks for clarifying. I will send a separate patch to remove SLAB_RECLAIM_ACCOUNT. > > - Eric