Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2623802rdb; Tue, 12 Sep 2023 07:31:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF14QiOGFW2Y387wrjvgDUBD9BdCD8hbLyr1G6R/Yu2K/iPBxCLPSUgUQc0rxZs4rcVpNWJ X-Received: by 2002:a05:6870:c1c7:b0:1ad:4c06:15c with SMTP id i7-20020a056870c1c700b001ad4c06015cmr15138512oad.18.1694529064871; Tue, 12 Sep 2023 07:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694529064; cv=none; d=google.com; s=arc-20160816; b=D9kZklmP1OV7OVAUQd+4N20zyAAeIbeHEIR1PASErarpxpfw8fpYjwEp7P7stqC2w7 AdI+wP3Rbp9Ba+WM7NyNG9G3SjP6UREIYKlJfoaakjZUH75mishqyzsf7PooiDC6lm94 9CEHKqo4YMOSRz53/tuV+vUm70bcI11ndGEm0ybluOowmhlRr4AnK84/83IO5Y5gI1fS 8WRhAPcqhV+gzBEGkK0PuQ6GHn80bntviqn5FAF6pXCE3/53FsIrQ8zkJM2ylj2zkUXp 9KYKk1XXuzav27edsruRx271IB5sH5NCUdzLz6BWn4qbk/v9d8vMK0Hz2tll+EOQOJ+g vyMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EOunaMdBflbK8HFLXFQgMvL9HG/NzyBjICktsp2nj50=; fh=fAzx+un+d2jU6sdW2AVF5xX2xBVDtR7Y9J1M6HiknsQ=; b=E0nMCnJdd7DBjnjfYyeIR6wJzUZYHdg1lVIRTQIYOOyuv0HUDIna5hudeF7lq9jcbP yP6wLiS8hlw7Bo8UgXURjgKh6n2iQG2z9hQwhBLwyh0+eDF8DLoPg7LWEU9Nv6BB4D5k aD80gicsK2CnaoWi++kzW1h8VEK6ALx2vqA2LZ6YLUTlSF4vKEKIfpiFEdrnTOQE3pNz nYiGP31pawm6sImboA+1FDznCiNWokpa44kqdWjVyZ2wC1+4VxiPteNum9Ifra2Ze7uz knVnNSV2ky0VYozd+Fft0oA+1kkoFXDsS5OFO7uXX/naYu2BSWhKNmdWSutgGk6sj0gr OWFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=juChOnAn; 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 Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id n16-20020a6563d0000000b0056513361b4fsi7743458pgv.741.2023.09.12.07.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 07:31:04 -0700 (PDT) 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-foundation.org header.s=korg header.b=juChOnAn; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E0132827D669; Mon, 11 Sep 2023 21:31:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241469AbjILDBc (ORCPT + 99 others); Mon, 11 Sep 2023 23:01:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241692AbjILDBV (ORCPT ); Mon, 11 Sep 2023 23:01:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C13C7991; Mon, 11 Sep 2023 18:30:27 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B213C116A1; Tue, 12 Sep 2023 01:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1694482226; bh=tT5AR8ExWn/1md74OJRAUxFuwJ+Te4kYQ5KJli+PF+A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=juChOnAnOoct4hJ1ym1PhysnDu87Z5ALN94QFwGTO7F03yuUUZw6tZu4NrcMvp6RN 0UIK75W7o3wI3TclaJg7qnC42dsWF8/B0hdGqvjEcJ3DYLOhd1RsUsV+1P3AWkv73O GoFmB7RMqKPxwgkC68jLHtF5k4MSW+k75OlXiUxw= Date: Mon, 11 Sep 2023 18:30:25 -0700 From: Andrew Morton To: "NeilBrown" Cc: "Chuck Lever III" , "Chuck Lever" , "Linux NFS Mailing List" , "Liam Howlett" , "Kees Cook" , "Greg Kroah-Hartman" , "David Gow" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v1 11/17] lib: add light-weight queuing mechanism. Message-Id: <20230911183025.5f808a70a62df79a3a1e349e@linux-foundation.org> In-Reply-To: <169447439989.19905.9386812394578844629@noble.neil.brown.name> 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> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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]); Mon, 11 Sep 2023 21:31:33 -0700 (PDT) On Tue, 12 Sep 2023 09:19:59 +1000 "NeilBrown" wrote: > 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. Thanks. Could we please get words such as these into the changelog, describing why it was felt necessary to add more library code? 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".