From mboxrd@z Thu Jan 1 00:00:00 1970 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?