Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1468889rdb; Wed, 6 Dec 2023 22:51:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvi+hLl/etwLLG4z6ZGLbI1TtB7Gk75Pf/y6kU0gs+62U7qbej5UDl93ZYXznz0nf4gcAE X-Received: by 2002:a05:6358:3423:b0:170:17ea:f4d8 with SMTP id h35-20020a056358342300b0017017eaf4d8mr2903935rwd.37.1701931859882; Wed, 06 Dec 2023 22:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701931859; cv=none; d=google.com; s=arc-20160816; b=y+N0TczcfDif2phvVo1CNYnt9jLXIBzsnvNP68JwTGZxomXylGxfuneMl63HquSdPT MB2APVvbOwX7Rdc6/mDblBxB/82XwXKKeD8Cpl9CGIZpFTn3D6ZgbHsP5VzGcTGE+6k7 so8bUj0nt8fmzKqlkmXL9EJw1vcX4p4vUOT0+mydtrRAXPOrUvq1Oa0zWGptJsU0UTyR j2xXDUEVWIcNLiYvbGh01yj2iBMMyCvyXrMbzbqySsTcS3qdx6ThD9EMA3GderGQDJVR 1WJi0nCwfsAhk3mPfbNIiyGVZlTkcjiA19zmvMAZ11Zzang3uJqF6urJ8TuHjB5rfeyv bafA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HiucoW+8Qq+OeGHdkctb71sJtz0w/36Ur4eVZYT+4P8=; fh=OvCUO7VSi2qhFSf1pAk0DSxAfqIFciTB3JbkL+4/94M=; b=pA+/R1ndcWUla3VOUOKPVJmKfCyYNPMzAfoy05XYUD7StVrF73IzRRTQDJDNUxpy9q Zp16H8r60ibHepTG0kD9NTilZSibuipeQIUP8jlo8IfB8gTlSVKedZJmfaLovxz6x1kv bY45NsS2JwYOBKT6c5SNORveF4szf36zwfWsJqvhqjxV8RvqZUVFu742jtvEL5Vqph5+ 8LKPfq5QIAVoP1Q5uQkdk0QFZgkuVGWuttxrnueD31n4b1zwDgDNBg/3qZDXj842uAAg ydvd6xk3pbukzfq50GMvFGPAIFQLqgFN75vzj8DZNo858lI9M9hM8uNxMgZob4N3TB4t 6SqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=sz34+fma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j7-20020a654287000000b005c6604d8a80si668744pgp.121.2023.12.06.22.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 22:50:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=sz34+fma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DA8EF80E6FB2; Wed, 6 Dec 2023 22:50:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbjLGGt6 (ORCPT + 99 others); Thu, 7 Dec 2023 01:49:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378030AbjLGGt1 (ORCPT ); Thu, 7 Dec 2023 01:49:27 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BFB10EB; Wed, 6 Dec 2023 22:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HiucoW+8Qq+OeGHdkctb71sJtz0w/36Ur4eVZYT+4P8=; b=sz34+fmatIf4sQJKuz9hINZ+wK Ml8GARBI7U2S82llMyj6nKnhgN6JS0a+NHihfwUeHWmuBvEUSpF4Qn+NwaXoZS1vL5A3fFn/NrqVe TJIDO+8XXB+whFkoqiZqL73hpiH2NOg1PvNWaPvAwNBkf8qM3AbYZG9t4bLphAUehRqBoU8W6x/EY ZLaPJFCenV3O7pb51r73svqe+JQjqOb+C5L5skHhISACaK+4PFPweYQSi6B1nOagTGVG6IMB43fF5 EmLeBpxT0rcfo0Apwf+NlpqSD7VNssQv6w6qHM53RxZlbZL94bOge/FHZBFvhaqedJwZMwNIGzfgB rGuyIp0Q==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rB8CE-0087sO-2z; Thu, 07 Dec 2023 06:49:19 +0000 Date: Thu, 7 Dec 2023 06:49:18 +0000 From: Al Viro To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-cachefs@redhat.com, dhowells@redhat.com, gfs2@lists.linux.dev, dm-devel@lists.linux.dev, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/11] lib/dlock-list: Make sibling CPUs share the same linked list Message-ID: <20231207064918.GZ1674809@ZenIV> References: <20231206060629.2827226-1-david@fromorbit.com> <20231206060629.2827226-5-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206060629.2827226-5-david@fromorbit.com> Sender: Al Viro X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 22:50:27 -0800 (PST) On Wed, Dec 06, 2023 at 05:05:33PM +1100, Dave Chinner wrote: > From: Waiman Long > > The dlock list needs one list for each of the CPUs available. However, > for sibling CPUs, they are sharing the L2 and probably L1 caches > too. As a result, there is not much to gain in term of avoiding > cacheline contention while increasing the cacheline footprint of the > L1/L2 caches as separate lists may need to be in the cache. > > This patch makes all the sibling CPUs share the same list, thus > reducing the number of lists that need to be maintained in each > dlock list without having any noticeable impact on performance. It > also improves dlock list iteration performance as fewer lists need > to be iterated. Probably a dumb question, but... "available" != "possible"; the code actually goes for the latter, which avoids nasty questions about CPU hotplug interations. Is the sibling relation on CPUs unchanging on CPU hotplug?