Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5972980pxb; Mon, 14 Feb 2022 12:04:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzA7nAxCHkpTEWWRoKcz218CXqXYDl8DSffXcq6cE1SC4eHmI19Aq2l/25mp6lsZpI0E3Da X-Received: by 2002:a17:902:8698:: with SMTP id g24mr475837plo.110.1644869043784; Mon, 14 Feb 2022 12:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644869043; cv=none; d=google.com; s=arc-20160816; b=SEdkiGMRGVDMAqwzwsRR/ssNQ3CeLxmQtTCVkjlDbUEpftlbev7fpOK9S4WHoY/dbJ r6lJYvFOEtAX3z7SDG3AYTj50328JGUwp2K1X40nSDa7N6ET5iBPM+cGt1qEYnLJ9f1v xQ4ZaSYmM6zq3uXopR9yA5UMrCD7geH3t2jlzjPoOjDZC2b6n2NQmBtcqgkDJCFlQ66v iTRnUL+fLQK1oaVHPsEvVOKo2tA2hT+CzEJ1WnwaimxFBiGAW+8imOAQsEteYvpz1ENQ cfLj8yN+NtibUcnDohvzkOjmzkEZbUI7pjiHJEjwBU9nEaQmVIMJCY0H+neKDhe4vhYv u/CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=aw8mF+WCQuCaB9/3Tpm5lA7wCf3d8rvYouovhwk2liI=; b=kEQrJtjvQ2/DXdBVOpncHN6my445/aR0XJ6B2LdeeEd3GJkXxPSUncLzOr+/fGaeeR 0xBys2LKixfAXqAHn3+bCkGjRu/KM9G8C59+u9UngurWpp1vAodyh+twvxYReZx0shX8 I3tJRSRTwJK6dH5tP7s4m3k6fV7EvtMGhMJXB0U54d3OREgTM0f3EyoNYsCnnBi3Ro7j oCropTJDFG6BjrhMGf9O/60vLqlv4XCAOSBs6ENEeNgm5l4SIZT6L8OVEb/yFjEIgzFd SMhGbIt1zMtezCDMhRhNBoUvh0nppeUs2lknLWpd3Uxncd6vj9Ev0z3+gm9beCuIPWrJ uwGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YZdOeoNR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c14si20940459pfl.136.2022.02.14.12.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:04:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YZdOeoNR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CEAFA1110A5; Mon, 14 Feb 2022 11:43:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352899AbiBNRj3 (ORCPT + 99 others); Mon, 14 Feb 2022 12:39:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344265AbiBNRj1 (ORCPT ); Mon, 14 Feb 2022 12:39:27 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69AE965433 for ; Mon, 14 Feb 2022 09:39:19 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id v5-20020a17090a4ec500b001b8b702df57so19581853pjl.2 for ; Mon, 14 Feb 2022 09:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aw8mF+WCQuCaB9/3Tpm5lA7wCf3d8rvYouovhwk2liI=; b=YZdOeoNRmJUFmpnXwi6VxMeN/gAVhp3aZepAvS1jmy3Ru5IFPSUy0D5RPex2WNsZlB MTNv5L7p5UXqbefw63X8FUodHLfDc8HgWmzyDeqRDMfTRh7FZEX0vSYxwr7bBCCW7nle Sbp8dUjV9g1I4HvXnAbCtGm5ZCeEvsklQJG2XS5xi9z2L7xYH0D6BY6TuLaPLsq0nn9e +F73c+CmGdz5tuyqc8Ff9CMGFuXca/9/c7a4IjXGj/7EEWHQ1OKKtCTlMSpwG08w+gIs PKR0szEjlZXAZIYJWghEZCSqg8MYXrt5la4As5RlwuXDQaouBOaj6wFAuC57Z5SxZmah tuCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=aw8mF+WCQuCaB9/3Tpm5lA7wCf3d8rvYouovhwk2liI=; b=OKRAfebYFUfvF9t905idfaYUO3dkrv4YHeU6yJvKSvsB0HLDtTRi1l8xSiir/ETDze FMPtmzD/Dc66b6yAkVONq4yFY3RQloFnn+Je8nPstrAIOh1JST/TpnZ2MEEXsiG9ErFA qlRI3XMnQQAP1L66fOP1zr0JVVoo2JCGz51dKou/w0MpA7rqWiol3/8yoQH9LBc6CThv P47Bk/9CPLyi0Hj1N9lI14DiI8SOO0Nw4yDghQrmgGMQhtKamGjv5McBPtAS3Pt2om8v 5RsvSCtuqAXhY/ncjam/VnVt6xBChy7nFdAfvlOY2LV22zUCWQRx45YmGGIhe7kXJsct kKug== X-Gm-Message-State: AOAM533CfLYbMopwMyL5bWQEuvf7Ln0wXxGJS0JYxhoHgJImGZePO9Xp glT19tAMPIMfRHzvO1vwP/k= X-Received: by 2002:a17:90b:1c8d:: with SMTP id oo13mr847078pjb.244.1644860358831; Mon, 14 Feb 2022 09:39:18 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id b2sm180410pgg.59.2022.02.14.09.39.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 09:39:18 -0800 (PST) Sender: Tejun Heo Date: Mon, 14 Feb 2022 07:39:17 -1000 From: Tejun Heo To: Imran Khan Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/2] kernfs: use hashed mutex and spinlock in place of global ones. Message-ID: References: <20220206010925.1033990-1-imran.f.khan@oracle.com> <20220206010925.1033990-2-imran.f.khan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, On Mon, Feb 14, 2022 at 11:19:38PM +1100, Imran Khan wrote: > > * How did you come up with the above numbers? Are they based on some > > experimentation? It'd be nice if the comment explains why the numbers are > > like that. > > > > I did some testing using different number of CPUs with qemu and the > above numbers were collected from there. It may not be optimum but this > is what I could think of while doing those internal tests. > > Do you think it may be better to make this configurable via Kconfig. I think it's good as-is for now and it's super easy and cheap to increase the hashtable size when some cases see a high contention. Thanks. -- tejun