From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFDABC28B30 for ; Sun, 23 Mar 2025 13:39:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83C95280002; Sun, 23 Mar 2025 09:39:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7ED34280001; Sun, 23 Mar 2025 09:39:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B504280002; Sun, 23 Mar 2025 09:39:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4B7D2280001 for ; Sun, 23 Mar 2025 09:39:36 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5E3F8824A4 for ; Sun, 23 Mar 2025 13:39:36 +0000 (UTC) X-FDA: 83252923152.19.BE4D410 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf11.hostedemail.com (Postfix) with ESMTP id 0B7CA40006 for ; Sun, 23 Mar 2025 13:39:33 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FV9N5rQC; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=BBZhvwsV; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FV9N5rQC; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=BBZhvwsV; spf=pass (imf11.hostedemail.com: domain of hare@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=hare@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1742737174; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BWVZ3Kdi+HJq7l0g1Bgu8S33aVRgtrlzt+LCiTo58HU=; b=koJfg2YjpoJW6kXMa6Zo69C4k6Fpqn6Lcm5Ep9F0YSRQD/wEi2E3yUDk0zaUsl4YhT0xOF 0z13kAXQ7BiheFWQLr5BAGYzb6+USYnM3rrhKlHZfod/or+kpAOt/WuO0XuYdeVMUQ6dWv gBihTxj9ra/ObnQ0Bc79Lz+iS5CwokY= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FV9N5rQC; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=BBZhvwsV; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FV9N5rQC; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=BBZhvwsV; spf=pass (imf11.hostedemail.com: domain of hare@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=hare@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1742737174; a=rsa-sha256; cv=none; b=SIgO48wzRwbNrYRcv/Bt95oONSCHiemuWJNP7VFdO3ik+ALTbD0bkF9QYobPCtFao7W4vj Um4X6YfOsnwQZQVPYfaHarf+WViiPtTR/LgTJo+izsmWM8lfOV1yFuof/cTM8BSGTLHnqF XmFl09Kwci88m7MUbwXD95JY7vhyiEk= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4FD3C2119B; Sun, 23 Mar 2025 13:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742737172; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWVZ3Kdi+HJq7l0g1Bgu8S33aVRgtrlzt+LCiTo58HU=; b=FV9N5rQCUbKqNJpr6VK34cwLh5HERn+QGIxB7STG1L/z5HIDePujWJfc+ZRGrJivQtYwVH XS+2SkWbm+zfE2zlweOy86hoW4+0dIe9bn0GVzcxTrcVbPQm3V2FGxFBoLf9G+QjQltuLl /a/Q+Zfge3b/5RRWQ7j8n9q6WUHN874= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742737172; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWVZ3Kdi+HJq7l0g1Bgu8S33aVRgtrlzt+LCiTo58HU=; b=BBZhvwsVeWCu5ErNU8iXwE0kf9m/svPIg6cc/iykFhiaUsGoDU/gx3OUWooVYxzQwU4ZNu ZV51dmE1M7a/6WCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742737172; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWVZ3Kdi+HJq7l0g1Bgu8S33aVRgtrlzt+LCiTo58HU=; b=FV9N5rQCUbKqNJpr6VK34cwLh5HERn+QGIxB7STG1L/z5HIDePujWJfc+ZRGrJivQtYwVH XS+2SkWbm+zfE2zlweOy86hoW4+0dIe9bn0GVzcxTrcVbPQm3V2FGxFBoLf9G+QjQltuLl /a/Q+Zfge3b/5RRWQ7j8n9q6WUHN874= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742737172; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWVZ3Kdi+HJq7l0g1Bgu8S33aVRgtrlzt+LCiTo58HU=; b=BBZhvwsVeWCu5ErNU8iXwE0kf9m/svPIg6cc/iykFhiaUsGoDU/gx3OUWooVYxzQwU4ZNu ZV51dmE1M7a/6WCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D800213757; Sun, 23 Mar 2025 13:39:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id VCzALhIP4Gc5NQAAD6G6ig (envelope-from ); Sun, 23 Mar 2025 13:39:30 +0000 Message-ID: <107a8fbf-c36d-4870-be86-ec1415139cab@suse.de> Date: Sun, 23 Mar 2025 14:39:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types To: Christoph Hellwig , David Howells Cc: Leon Romanovsky , Christian Brauner , Matthew Wilcox , Chuck Lever , Steve French , Ilya Dryomov , netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20250321161407.3333724-1-dhowells@redhat.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B7CA40006 X-Rspamd-Server: rspam05 X-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i4XSLBT51hSSbws8O9a9zy4QjlwoZ7ScO/Cs+Rx5auIeTLOHTOGm+h6xIQS1eQhsQ6EefjoxKFQLjKKtTL0YukXS3kxVM/utEd+O3VV5fE+IApvbXQoevUbRyzIwk3SSZ/JBQj2JnUOl8wjBs6dQfnXp+tShaUEVBOcQ9/BBPNq7XA5x/ZeZRkB/Pg6uS7i04aAN7/GGQKwHe3qMS3h12p8eB6GI8w5wLEme0LtG8lFcIollLJ+tkGhMtJYtQq1mM1HuEQocK/maQMnBvcMvktwk+XdbhdvWoG38h8isl8AuDROx4l47YGLvT3GmVeU8lK+PgmHDx5+sQ9TOqIMpBJFOIP+QAhYOrgAq4idiFSsAyCpzmVVqt6phs X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 3/23/25 07:21, Christoph Hellwig wrote: > This is going entirely in the wrong direction. We don't need more iter > types but less. The reason why we have to many is because the underlying > representation of the ranges is a mess which goes deeper than just the > iterator, because it also means we have to convert between the > underlying representations all the time. > > E.g. the socket code should have (and either has for a while or at least > there were patches) been using bio_vecs instead of reinventing them as sk > fragment. The crypto code should not be using scatterlists, which are a > horrible data structure because they mix up the physical memory > description and the dma mapping information which isn't even used for > most uses, etc. > > So instead of more iters let's convert everyone to a common > scatter/gather memory definition, which simplifies the iters. For now > that is the bio_vec, which really should be converted from storing a > struct page to a phys_addr_t (and maybe renamed if that helps adoption). > That allows to trivially kill the kvec for example. > > As for the head/tail - that seems to be a odd NFS/sunrpc fetish. I've > actually started a little project to just convert the sunrpc code to > use bio_vecs, which massively simplifies the code, and allows directly > passing it to the iters in the socket API. It doesn't quite work yet > but shows how all these custom (and in this case rather ad-hoc) memory > fragment representation cause a huge mess. > > I don't think the iterlist can work in practice, but it would be nice > to have for a few use cases. If it worked it should hopefully allow > to kill off the odd xarray iterator. > Can we have a session around this? IE define how iterators should be used, and what the iterator elements should be. If we do it properly this will also fix the frozen page discussion we're having; if we define iterators whose data elements are _not_ pages then clearly one cannot take a reference to them. But in either case, we should define the long-term goal such that people can start converting stuff. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich