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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E92C27C41 for ; Wed, 16 Aug 2023 20:37:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346119AbjHPUgc (ORCPT ); Wed, 16 Aug 2023 16:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346179AbjHPUgJ (ORCPT ); Wed, 16 Aug 2023 16:36:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB37F2705 for ; Wed, 16 Aug 2023 13:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692218122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8oUR7dATEA9GXbFeybfh8Kk00mHSoSorpZF1PcQEdPw=; b=Ylb7Jmr1gVo0g34UKYEGlDpYpcQ28b6l2lfzs0sFrB4VTG4GV1nz/3NfM4U9ESrGID5rvU fxw6A8pUUQlRYhkRpuQ4V5a+3KgottQsWEU03/bpTL6vOZ/nVlu2EBFQJo5904168cpBmz WlFqspawVObBPI8sjPzqZRau6Nx1FT4= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-7-2T0FB_1HO5SCDKlfnSHo-Q-1; Wed, 16 Aug 2023 16:35:18 -0400 X-MC-Unique: 2T0FB_1HO5SCDKlfnSHo-Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC6C83C0F685; Wed, 16 Aug 2023 20:35:17 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF6EF492C14; Wed, 16 Aug 2023 20:35:15 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <03730b50cebb4a349ad8667373bb8127@AcuMS.aculab.com> <20230816120741.534415-1-dhowells@redhat.com> <20230816120741.534415-3-dhowells@redhat.com> <608853.1692190847@warthog.procyon.org.uk> <3dabec5643b24534a1c1c51894798047@AcuMS.aculab.com> To: Linus Torvalds Cc: dhowells@redhat.com, David Laight , Al Viro , Jens Axboe , Christoph Hellwig , Christian Brauner , Matthew Wilcox , Jeff Layton , "linux-fsdevel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 2/2] iov_iter: Don't deal with iter->copy_mc in memcpy_from_iter_mc() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <665723.1692218114.1@warthog.procyon.org.uk> Date: Wed, 16 Aug 2023 21:35:14 +0100 Message-ID: <665724.1692218114@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Linus Torvalds wrote: > > What about ITER_BVEC_MC ?? > > That probably would be the best option. Just make it a proper > ITER_xyz, instead of an odd sub-case for one ITER (but set up in such > a way that it looks like it might happen for other ITER_xyz cases). I'm not sure that buys us anything. It would then require every call to iov_iter_is_bvec()[*] to check for two values instead of one - including in iterate_and_advance() - and *still* we'd have to have the special-casing in _copy_from_iter() and copy_page_from_iter_atomic(). The issue is that ITER_xyz changes the iteration function - but we don't actually want to do that; rather, we need to change the step function. David [*] There's a bunch of them outside of iov_iter.c.