Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp636693rdg; Thu, 12 Oct 2023 17:00:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX7k+Fmf7Gx1J8SqZVFpv6tSS7bEVODfO3/f8WhqeMiHoEWSBdsGRmzDRRD/B56Bm/D0BW X-Received: by 2002:a17:90b:1b4b:b0:27d:3290:dee3 with SMTP id nv11-20020a17090b1b4b00b0027d3290dee3mr960127pjb.2.1697155201622; Thu, 12 Oct 2023 17:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697155201; cv=none; d=google.com; s=arc-20160816; b=DccV/C9K0x9S14+O14jL5a0u/DEHLDWKdWfjk9+I+JKFU/3Gr5GGJtbwhK1eZAN3vt odo29ZZjJMkIAxQtQeNweCpaM9n7/WAlYlEEYMXULZ2lhBhZrDJ6erM6s4lGceT+cuJs bB6Bt5ozj07BQaOfycBM8K7GEJDkJ4oiTKHH21WWXs1+Bbz78EQwelqHmmrqDxVeP9Ff xgUT2sCqIt3Mm2y+2E7QRXlvpvR7RRkxE7wp862LkyvPn/7uPKhcbnai4CR3PC4CjnE5 Lz0YG99mE75SvfszuS3xmpPDXjxL1q/PCM/gl8fPCZAUW5Jv9E/OSH1pwy8jxloja5Fb BxRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=e9GaXfWsi/7WQYTgQPNsZbyXpgIytjUO3rUQd1WDOEU=; fh=aDEEY8OW/JfS1wXijeFOdiAlTyzy8aGJWcyCsL0V6oo=; b=rhG3iiLU6igpPVJiOlJC4/KyEyqEsWpHOqgcR/k5rY2+etR0k5c+ff8xpzE+QJlAiK JBAPS8U00sNlEJHJK+56RKbb+ldxWiTE853jp/V5Ef3yNK6P1Bo/rVPbAkn2EzSfM9Ia +O254D58tqASUDsa4sFknuxPcjx46pF8IWBmE1aYLXI9dObTgw8xv2ikGCSNHE7NAAeO f6wQaXN+9zyWVnXKq7xiojTh3zs/sTV5O0clHMhQPWDp1HmCfalMJReeHYVc6gHqZ41J 4QOTZbHhi1UM9MDHRVrPFctkmt2YjyXLCl7WuherIUfBLxKpuBIbw6aB8FnBTPgvYjcC TQOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google2022 header.b=RimZll2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a4-20020a1709027d8400b001bf1005924csi3084007plm.321.2023.10.12.17.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 17:00:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@purestorage.com header.s=google2022 header.b=RimZll2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6E95880C8779; Thu, 12 Oct 2023 16:59:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233273AbjJLX7v (ORCPT + 99 others); Thu, 12 Oct 2023 19:59:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjJLX7u (ORCPT ); Thu, 12 Oct 2023 19:59:50 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0905A9D for ; Thu, 12 Oct 2023 16:59:49 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53df747cfe5so2850805a12.2 for ; Thu, 12 Oct 2023 16:59:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1697155187; x=1697759987; darn=vger.kernel.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=e9GaXfWsi/7WQYTgQPNsZbyXpgIytjUO3rUQd1WDOEU=; b=RimZll2QMAF4B2/1JWRGopbD1e+BffaJj9U+k4HrKl/HTyCGsN5S1jsSvBFOK5WRn9 PEeWSlrbaGdcQZh3T934VO8+ig9jd/bHzEfR8nccTjlkiFfnV7qqZGy4EYOwvFv18inB 9hiyyDxKHEUGKtPWg9TNBqlFZGL67jTj11lLhw9cNeKwATgI1e8NYHvaWfKrC0/E1lqW 3C4nQMcbfq1zpIH0NtZBNzJGlyYTAIv/jWmNxFxitVodjOiH8QvMi5pQvvLUOesb4Knf jwlOwRAPBLSznIiigG57y9IPTor90Tu+FXP8Cwiny1KnBdmcsyIs9WhQg4Eyc15zOwjO YG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697155187; x=1697759987; h=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=e9GaXfWsi/7WQYTgQPNsZbyXpgIytjUO3rUQd1WDOEU=; b=kYtke2hwlEu2VuQmAO9QGOzL6FCiqlniSb+zQJYNTbJa0gi3bkBHktwyRWb4mcEFQw dIo2tufJAOmwBTkUY7AFfuM75gcMT5Yh7+sEu6YKAAkn1R1Oa/rtQYsYNmXXfan+1bAN vQVBw3z0MA87tt0VO4z7/FRX2cuY6rRPGbMME5VUwtRTDdCL1LtpYsY77KiXUvF1Q4gT JEcNtqL1/tJVOFLtz1P8QNMMdaxtKWexU43urZyN7zbApIkrer5EAHtqt9Vdig41ZdHW Co2bfnUfn9RLIjcB8aUR/FytH6BqZ9ilCddvbv4KAFtLiVAI79JwmQ8P0P57LvkJcFJ9 QF5g== X-Gm-Message-State: AOJu0Yz/BFG24705wCy8DN6tZPkq0Tng+WUeyHczErJDMYqR9BkCMtg1 mGO6eLwgBLwzs5rm1xeMag8Siwvws0ihqNXXijVw+oldw69p2d06 X-Received: by 2002:a05:6402:27c9:b0:53d:993b:6b68 with SMTP id c9-20020a05640227c900b0053d993b6b68mr9297967ede.36.1697155187466; Thu, 12 Oct 2023 16:59:47 -0700 (PDT) MIME-Version: 1.0 References: <20231011213919.52267-1-sconnor@purestorage.com> In-Reply-To: From: Seamus Connor Date: Thu, 12 Oct 2023 16:59:34 -0700 Message-ID: Subject: Re: [PATCH] [WIP] configfs: improve item creation performance To: Seamus Connor , Christoph Hellwig , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 12 Oct 2023 16:59:59 -0700 (PDT) > > This is subtle. Your patch description of course describes why we are > partitioning the items and attributes, but that will get lost into the > memory hole very quickly. Please add a comment. > Will do. And thanks for taking a look at the patch. > Plus, aren't the pinned/not-pinned checks redundant? Can't we avoid the > extra conditional? > > > ``` > spin_lock(&configfs_dirent_lock); > list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { > - if ((sd->s_type & CONFIGFS_NOT_PINNED) && > - !strcmp(configfs_get_name(sd), dentry->d_name.name)) { Unfortunately they are not. CONFIGFS_IS_PINNED and CONFIGFS_NOT_PINNED are asymmetrical. There is the readdir cursor (s_type == 0) that might be anywhere in the list and should not be treated as a pinned item, but should also not be treated as an unpinned attribute. Is there any testing that you could recommend for this change? So far I've gone through testing of our internal components that depend on configfs, but I haven't done anything targeted. Thanks, Seamus