Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4305734rdb; Thu, 14 Sep 2023 19:56:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlh9feH4lDVOXaCEA4r39l3SVvyBP9a/1u4MbfJsoW7WU4amtHb1F9OlheX9TDnIBCkQES X-Received: by 2002:a05:6a20:158b:b0:155:5c28:ea63 with SMTP id h11-20020a056a20158b00b001555c28ea63mr4100695pzj.31.1694746599466; Thu, 14 Sep 2023 19:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694746599; cv=none; d=google.com; s=arc-20160816; b=REzL636g0JQeX/fvpCTrqCWYBFfJnMKJK5j/z6AyTn5FwvBbsmcdaN2HNauY+/2aZn 4QwpHFikz6F1Nsvp0GFfkTu0fiTsajJGcjgI9tkF4C4eAzlppIgs10w1MeFfU1LoHPKL 86dPXXFFr0jIuKkKtOABoXY2kHqT2mYo/UVUCosjzZrzZ+qJlpCSj24GmeaEvuCp0iFU A0MSynRcqwmyigSRRjpi7cmkdz/FM6fyylRxU0ZtdoYtlDFZsA1l92Iayg7uGWbBfW+m i/ET2K5yXqr3hDFe/UcoMQ8yDvD1ChGL8PQfMAVA90qwA2mNpbtqFKi11cOicacglOtG mKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=VfSlGTI78LzrwujVTg1Dy+42n81WkfT7MFhFZD+AQD0=; fh=yL6JTvLDvAghlS9saFaA/UgYOrIx7cFrnrRtlNhZx6E=; b=z3nH7huwjhtLirSNrJE+IIuiWnP0pMRmXqm99bqFAVA54w5E4qNd5MZL1GKjaFUIQt /VkIBvS9P48muYC+buzsAI2hzz9pXZzAFp5qOGebMcaW6ndzRkTsd0F2GAFjVSaEzi4c EauZiHnRG6XXQYCOgrQDFCMq3PxtLxoVHJ3te12SesuldGvnS4yV4KUK1gUIJUNbxD2i QegPeWW74GYOvFhJBooKxywJOsY56KGoXtdx43ovGHr1YnVm63cO1K6oZSQ0lN4ruCde l9+1Fy72O3V11ZX8LANYk1FoZ3LvgK0iaqQKJEh2w4fMX/O9fVIDWrEDxiVBy2d06KD8 Vc7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pS2xFeLY; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="3cMNy0f/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ca20-20020a056a02069400b00563e283786esi2789520pgb.104.2023.09.14.19.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 19:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pS2xFeLY; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="3cMNy0f/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5142E81C395F; Thu, 14 Sep 2023 18:55:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231469AbjIOBzK (ORCPT + 99 others); Thu, 14 Sep 2023 21:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231726AbjIOBy7 (ORCPT ); Thu, 14 Sep 2023 21:54:59 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D11394C3D; Thu, 14 Sep 2023 18:52:08 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5BF461F74B; Fri, 15 Sep 2023 01:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694742721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VfSlGTI78LzrwujVTg1Dy+42n81WkfT7MFhFZD+AQD0=; b=pS2xFeLYt//6VYt6FylnPEa5GnGp1mDfir1JQJy9HTTsu+Zehw0BbdF5fqzQuxMc6a2Ci7 R16/zb0GZk1KcxwdG1S4i/+TsUvTIr5+9X7t01i+kioI+zS+Hoviu2G8mysjzDBtmjyeWl ni12+CG7FnOk47TF237ETI59azcTFwE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694742721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VfSlGTI78LzrwujVTg1Dy+42n81WkfT7MFhFZD+AQD0=; b=3cMNy0f/HuRqRw45J11T2+bi0J60kVuWqEMJL8CUF4/BuK2H8xg3//FtfywIaLOozZfqik pSQqPGnlRVxBSnCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 42B601358A; Fri, 15 Sep 2023 01:51:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id t12gOb24A2XkEQAAMHmgww (envelope-from ); Fri, 15 Sep 2023 01:51:57 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever III" Cc: "Chuck Lever" , "Linux NFS Mailing List" , "Liam Howlett" , "Kees Cook" , "Greg Kroah-Hartman" , "David Gow" , "linux-kernel@vger.kernel.org" , "Andrew Morton" Subject: Re: [PATCH v1 11/17] lib: add light-weight queuing mechanism. In-reply-to: References: <169444233785.4327.4365499966926096681.stgit@bazille.1015granger.net>, <169444318342.4327.18355944158180782708.stgit@bazille.1015granger.net>, <20230911111333.4d1a872330e924a00acb905b@linux-foundation.org>, <4D5C2693-40E9-467D-9F2F-59D92CBE9D3B@oracle.com>, <20230911140439.b273bf9e120881f038da0de7@linux-foundation.org>, <169447439989.19905.9386812394578844629@noble.neil.brown.name>, <20230911183025.5f808a70a62df79a3a1e349e@linux-foundation.org>, Date: Fri, 15 Sep 2023 11:51:54 +1000 Message-id: <169474271454.8274.2673279792882072455@noble.neil.brown.name> 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 (pete.vger.email [0.0.0.0]); Thu, 14 Sep 2023 18:55:12 -0700 (PDT) X-Spam-Status: No, score=-0.9 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 pete.vger.email On Fri, 15 Sep 2023, Chuck Lever III wrote: >=20 > > On Sep 11, 2023, at 9:30 PM, Andrew Morton wr= ote: > >=20 > > On Tue, 12 Sep 2023 09:19:59 +1000 "NeilBrown" wrote: > >=20 > >> Plain old list_heads (which the code currently uses) require a spinlock > >> to be taken to insert something into the queue. As this is usually in > >> bh context, it needs to be a spin_lock_bh(). My understanding is that > >> the real-time developers don't much like us disabling bh. It isn't an > >> enormous win switching from a list_head list to a llist_node list, but > >> there are small gains such as object size reduction and less locking. I > >> particularly wanted an easy-to-use library facility that could be > >> plugged in to two different uses cases in the sunrpc code and there > >> didn't seem to be one. I could have written one using list_head, but > >> llist seemed a better fix. I think the code in sunrpc that uses this > >> lwq looks a lot neater after the conversion. > >=20 > > Thanks. Could we please get words such as these into the changelog, > > describing why it was felt necessary to add more library code? > >=20 > > And also into the .c file, to help people who are looking at it and > > wondering "can I use this". And to help reviewers who are wondering > > "could they have used Neil's thing". >=20 > Neil, are you planning to send along a replacement for 11/17, > or would you like me to fold the above into the patch description > I have now? Sorry I didn't reply sooner - been busy. I'll send a patch that can be squashed in to 11/17 which adds some more explanatory text. Hopefully soonish. NeilBrown