Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp234671lqq; Thu, 13 Jun 2024 01:10:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9iVfovUwbhiW8QWrSfnezE3dSOgp90Z0iC3YRSdfb/uc6w2nHisKQjAwgGXq4McLtHHJNTaOXcik2lAtrQipHHz+S7YRJz/yOnwBObA== X-Google-Smtp-Source: AGHT+IGxQ2j8GdnVwvQHbqR9Ji4bBsumks4fEwjVgCYdzISzUPn8xAPbDgYnHD2TbimamTTy84PM X-Received: by 2002:a05:6214:4505:b0:6b0:7fcf:36b1 with SMTP id 6a1803df08f44-6b1a6b5dc2amr46661916d6.41.1718266231491; Thu, 13 Jun 2024 01:10:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718266231; cv=pass; d=google.com; s=arc-20160816; b=0MQytxliJ2y+sD5UDx9l4FCqlqm4OsZyRxKXAXPbsTB1erVLTyDXN5Ec8PJXABewQX C4vWqdi4NcT/YIIQrq7fVisQO1Ph9odky84VxKeF49xVFpFUFRLbJhfx1ALD9KnmDi7x 0EPx5iH9eyOh2hrcEu3azvYl9RtCA+3eeaXRb6S/sp2594dgvQEA4E1RlDGA/knusGMG quBRRyKT3CEZVHzWl1rR8C3Q3dZCRmCELr0D/kdJv4Fi/RN9N0pY8hXyrMt6aR1HwQXW 3asrrHXQIdatU9cCR/DMdOO2F3Un9VslSWDef+UdYov/tyYqiHVQmJt5nMKs4rmuAJbS yLiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=MzZ+h9Adx5M/YlYjt1i4L1ue8DP3AspVMDNT/CPuOe4=; fh=1DTJ4IZs8QgwLqTspeb8QfaHDowh4Uz10/8bJQCTfLI=; b=WHbbUChSFfx3KOghBTj11YcDqYjwJ5DIKDOYFhLr6GevpPuvdw2NgPfQJFKo0QCz7i 67h2Rg8XcSGaddJkqFdrtVnS/SZ1k6xm0+kccS2ZcM0t1zVgktSZS7Nqg5Mx117eCl0l oVQxCE12eu7+f8As6eXNjJt2FIlDvIaCM0qT1jMui+bah8tJYxGIU1VTu05pS8ee758t RYfWqTkOOyuCj9vgNen9jhAkNxafHi3xRpgpBsGUubYze2hIG4K8xxiVZG4q3xrKA2q4 9HXYcarbGRzimMDgdMqP2OSe6O9DYlXBIM+hPrWvBgg8294uMni2ttxFslb9yM1TGmRO kK8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-212780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212780-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5aff7a0si9359116d6.265.2024.06.13.01.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-212780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212780-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 37AA91C2303F for ; Thu, 13 Jun 2024 08:10:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 098DE13D253; Thu, 13 Jun 2024 08:10:25 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69F2513CAA7; Thu, 13 Jun 2024 08:10:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718266224; cv=none; b=ulsTYWzP2c4VsBNS/W9dX8SVuLFzcjZrtioOQVj4g9XwsdEBT6xs6tyr05LoEiD3WT8vBKNxQ/Fk6lnJUbVwqpjqD70PGIb6r/DxKiRUioZF0KD88gmat1X5kLzsP012BdvCQ9ophW2fznUgh7ct3wRKUmrowOzP0xXM1OMxWkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718266224; c=relaxed/simple; bh=kuCRy/dvwvgH5lryVQtV60zwp/KBdbHgxITSfmkLE3Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BfIZncIYiBmpui/bXL/BZ8yaBDINm3u5hNiB0mf+7uJOc3Wqj5ycFfLu4EvU/r8Q+DLMcpyT94uw4qsZWHoegh0pRhJIllJGiRCXd46wejdSnSlaQLV6S/c35HwvPdw4Y5IGejYe+K5bv0l7uRnKSfSw7xTaJ883D9okiWG3hB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id E4E6268AFE; Thu, 13 Jun 2024 10:10:16 +0200 (CEST) Date: Thu, 13 Jun 2024 10:10:16 +0200 From: Christoph Hellwig To: Nilay Shroff Cc: Keith Busch , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, hch@lst.de, sagi@grimberg.me, paulmck@kernel.org, davidgow@google.com, akpm@linux-foundation.org, venkat88@linux.vnet.ibm.com, Keith Busch Subject: Re: [PATCH 1/2] list: introduce a new cutting helper Message-ID: <20240613081016.GA21500@lst.de> References: <20240612155135.3060667-1-kbusch@meta.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Jun 13, 2024 at 10:26:11AM +0530, Nilay Shroff wrote: > I am wondering whether we really need the _rcu version of list_cut here? > I think that @head could point to an _rcu protected list and that's true > for this patch. So there might be concurrent readers accessing @head using > _rcu list-traversal primitives, such as list_for_each_entry_rcu(). Yes, I can't see how this works for a RCU lists without very careful memory ordering. Btw, another thing - the old vs new list ordering is reversed vs list_splice*, which is a bit confusing (as are the parameter names both for list_splice* and this new helper). Can you switch them around to match?