Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2999495rdb; Tue, 12 Sep 2023 21:00:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoD6d3OFw4iYNMyGPi7J6eVzu4an8T2o2k161IItxtR8G66vzmddmYGaEtNqSOh3DGYl+i X-Received: by 2002:a05:6808:114c:b0:3a7:805:d42e with SMTP id u12-20020a056808114c00b003a70805d42emr2254955oiu.15.1694577650879; Tue, 12 Sep 2023 21:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694577650; cv=none; d=google.com; s=arc-20160816; b=Vi2FGkzfruNs1l0dtpjeOXAOcFJahMZJ+7nyuC3cK0h6OMIQYHlP6T8697nzE6tkdo n0yDydlR6MovqwGfK7qyu/4eldecANJ/eQxft1OGI59auxczSvYjEsxSwzTBphh+vBu9 Y/T+0Ycr4o0LHMfkcgXJpm07JNtMmUcKc3+ZtdL/TNjpjUA1LnGV7LieJe0qQjAQ8s+s P1HSZqmORUTe6H+oOXBl8FWFaQI9PNtvRjYvwtCrJd+FxKFSMYc1tCjX6FuHKqOQmjff 07Kmuh/WyzRhHUsvDQn4WdVo4/ZgT1RRnWdjGqaF3wK2hOvsk1X3bNHhIxmAcdNGaMHH lcPg== 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=hUCWWiNpdv5HaBnnJAVal1/HvguTN1u/uzvcfGpH7Q8=; fh=QH9YPejey28jFan6r0US0Qh0A7GFfoaqWtFQMSmq3WI=; b=pxtiKnZK39qN+/2BWtNEdkmY+zq7MPkENslROyfRKQZqpU6ZeYUd1P1AQ8SSaVw9kl oJvx/07/40EoYJfIMg73BRVEtT0BmZCs72COx1KhcI8uSK33J4nKf01cX6hH91Lu8IQQ 3ES+nISt2sSOFyPCqqxX0k6E1ZwL98P9qqPI2qDxbT1XR8qYtYbjx9+5btrgafWPuvuR 9GSYrbZKC9smleNDDb5EVJ7cGcS/aQv7g/G31mojg7r3mFRKz2elgVqvqWkvz1bvXXRY 6O+oPe+4VYeS/3f2ymKka/MANfC3jXtGYt1Cs9FPAVGkLTH/qGTLCBrAAge0nd2G6Vhg QGVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=sMCF6iaR; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o9-20020a634e49000000b00573faff7d3esi8862179pgl.712.2023.09.12.21.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 21:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=sMCF6iaR; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B5B8281B6AB2; Mon, 11 Sep 2023 21:28:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239077AbjILCmS (ORCPT + 99 others); Mon, 11 Sep 2023 22:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240095AbjILCl6 (ORCPT ); Mon, 11 Sep 2023 22:41:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02F110459E; Mon, 11 Sep 2023 19:07:25 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4045AC43140; Mon, 11 Sep 2023 21:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1694466280; bh=PSrTXoaCkMqB25RCHK4NE97OZaul62KlU0MSCOVqCUs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sMCF6iaRqgwVigUxFRLF1Ahh66xljEvSW6gMnyW6Wz7ahzgfSGIf5eSCAhwKG1map 92+N3vZMF+n+AWjJrL80Ca1REYC9r+zk0/UtC8J+MlqFBSnbUQzWVtlT6wMNK78hCj 1r7zjFzHKLFwZIWG5KkxCFP0+pCA8bEnycT87hHU= Date: Mon, 11 Sep 2023 14:04:39 -0700 From: Andrew Morton To: Chuck Lever III Cc: Chuck Lever , Linux NFS Mailing List , Neil Brown , 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: <20230911140439.b273bf9e120881f038da0de7@linux-foundation.org> In-Reply-To: <4D5C2693-40E9-467D-9F2F-59D92CBE9D3B@oracle.com> 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> 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-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Sep 2023 21:28:43 -0700 (PDT) On Mon, 11 Sep 2023 20:30:40 +0000 Chuck Lever III wrote: > > > > On Sep 11, 2023, at 2:13 PM, Andrew Morton wrote: > > > > On Mon, 11 Sep 2023 10:39:43 -0400 Chuck Lever wrote: > > > >> lwq is a FIFO single-linked queue that only requires a spinlock > >> for dequeueing, which happens in process context. Enqueueing is atomic > >> with no spinlock and can happen in any context. > > > > What is the advantage of this over using one of the library > > facilities which we already have? > > I'll let the patch author respond to that question, but let me pose > one of my own: What pre-existing facilities are you thinking of, so > that I may have a look? Well, I assume that plain old list_heads could be recruited for this requirement. And I hope that a FIFO could be implemented using kfifo ;)