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 DB78333C5; Fri, 29 Nov 2024 06:19:46 +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=1732861189; cv=none; b=hHoct4W3Oho/fVPgt0OnXuAcFfOVxtFw4lxw4mvp9eTKCoz3a/cXG+Gffv57VSuezEL+hWccOgbonFAlhWgXhQtQWxYIupO5I0b7UnD2Pr16w1YVOln1m41lo/IGBm0gGxuxTohVH1QstdlYmB+ZbamqosH0qjFMc0qtPig7aDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732861189; c=relaxed/simple; bh=qSqLb7BZcVT2uKGBag8OryyBOgcsQgYjO4br+Pg3knY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RQp3UhE6lZ0cOeBwTbwTWjRnSIKQhugvSeXlWN+Uapx1vBroZxq26AmoFQCaCJOfwCuYc5Zh+WDGdUaTJbNaMs05kPA0oEoulv8fdE/SOW9NnQMkfMlX+Sdp+fclzgmwO5fZNT3xoLZYt5aCGA/a+q3YZbCREuIOlzWXevhGZyQ= 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 29B9D68D1C; Fri, 29 Nov 2024 07:19:42 +0100 (CET) Date: Fri, 29 Nov 2024 07:19:41 +0100 From: Christoph Hellwig To: Damien Le Moal Cc: "Martin K. Petersen" , Bart Van Assche , Nitesh Shetty , Javier Gonzalez , Matthew Wilcox , Keith Busch , Christoph Hellwig , Keith Busch , "linux-block@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-scsi@vger.kernel.org" , "io-uring@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "joshi.k@samsung.com" Subject: Re: [PATCHv10 0/9] write hints with nvme fdp, scsi streams Message-ID: <20241129061941.GA2545@lst.de> References: <20241112135233.2iwgwe443rnuivyb@ubuntu> <9d61a62f-6d95-4588-bcd8-de4433a9c1bb@acm.org> <8ef1ec5b-4b39-46db-a4ed-abf88cbba2cd@acm.org> <7835e7e2-2209-4727-ad74-57db09e4530f@acm.org> <9e9ca761-6356-4a97-a314-d08bd5ea0916@kernel.org> Precedence: bulk X-Mailing-List: io-uring@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: <9e9ca761-6356-4a97-a314-d08bd5ea0916@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Nov 28, 2024 at 05:51:52PM +0900, Damien Le Moal wrote: > > Maybe. But you'll have a hard time convincing me to add any kind of > > state machine or bio matching magic to the SCSI stack when the simplest > > solution is to treat copying like a read followed by a write. There is > > no concurrency, no kernel state, no dependency between two commands, nor > > two scsi_disk/scsi_device object lifetimes to manage. > > And that also would allow supporting a fake copy offload with regular > read/write BIOs very easily, I think. So all block devices can be > presented as supporting "copy offload". That is nice for FSes. Just as when that showed up in one of the last copy offload series I'm still very critical of a stateless copy offload emulation. The reason for that is that a host based copy helper needs scratch space to read into, and doing these large allocation on every copy puts a lot of pressure onto the allocator. Allocating the buffer once at mount time and the just cycling through it is generally a lot more efficient.