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 94F98EB64D7 for ; Sun, 18 Jun 2023 17:28:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E5BA86B0071; Sun, 18 Jun 2023 13:28:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E0BD76B0072; Sun, 18 Jun 2023 13:28:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD3416B0075; Sun, 18 Jun 2023 13:28:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BD0F36B0071 for ; Sun, 18 Jun 2023 13:28:52 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7FC5280305 for ; Sun, 18 Jun 2023 17:28:52 +0000 (UTC) X-FDA: 80916553704.23.6E4F318 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id E6DF680011 for ; Sun, 18 Jun 2023 17:28:48 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Z0GbKvUT; spf=pass (imf30.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687109330; 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=ccXraZTQ7XryyK5LpNAR74GJ0dtmJGkdhwIEf8RJTcI=; b=MmGyLA1I6/4lHiJwcIWItyRdATFZg72J5JKBFtou7kSJsgOsY1Z5h90tTYqGYEFAtGtjGX GJK3mBhBsZ51MOfQJulBa0vVrHMVr+UU0fJzbXBqvjEjzSc2Wd6ncOTYbzTlu1dx1v+1OV /XmyCx50k9cjnOkmqRSVGGqodCDfHwE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687109330; a=rsa-sha256; cv=none; b=cui18O0K98+MDNnYV3jCNhfkyG4WbX5M2fcLeQvYfWJxeH3MtT8UOFo3fooGBwl8OAKCUY +DxG8wMktVGK32yMygO1GvBTcAnzPwr+1kzUW/xkbg0OwH2BOFmMaQwl4q8l1+PPAvIxYo 3hny21S2HhDGwVoiNhwMfXg5nABstCc= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Z0GbKvUT; spf=pass (imf30.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687109328; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ccXraZTQ7XryyK5LpNAR74GJ0dtmJGkdhwIEf8RJTcI=; b=Z0GbKvUTg9HYKhexFu9ohLnAnLShQ0tXKmctMwfWEFXH94TpdkhHSjDKr4HZYIuw+A0pBt rQyIZ3zKhwsfFTI3a9RPUbLkF1j3VU3UoVP/wqm78KDWY4WeYe3B0Hd96yg3D+yjOosHV9 YpubQaZN5vzqy9f1d5s87ug7LqJNC8c= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [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-612-QbA_4gTuPJSb27gVyaPZjw-1; Sun, 18 Jun 2023 13:28:44 -0400 X-MC-Unique: QbA_4gTuPJSb27gVyaPZjw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D77563804A4C; Sun, 18 Jun 2023 17:28:43 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB45F40C20F5; Sun, 18 Jun 2023 17:28:41 +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 In-Reply-To: <648f353c55ce8_33cfbc29413@willemb.c.googlers.com.notmuch> References: <648f353c55ce8_33cfbc29413@willemb.c.googlers.com.notmuch> <20230617121146.716077-1-dhowells@redhat.com> <20230617121146.716077-11-dhowells@redhat.com> To: Willem de Bruijn Cc: dhowells@redhat.com, netdev@vger.kernel.org, Alexander Duyck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , linux-nvme@lists.infradead.org Subject: Re: [PATCH net-next v2 10/17] nvme: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <754954.1687109273.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable From: David Howells Date: Sun, 18 Jun 2023 18:28:41 +0100 Message-ID: <755077.1687109321@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Rspamd-Queue-Id: E6DF680011 X-Rspam-User: X-Stat-Signature: mkk3uf7m9s9gmxqb5ymqo1q3qohz6ozj X-Rspamd-Server: rspam03 X-HE-Tag: 1687109328-55047 X-HE-Meta: U2FsdGVkX1/DUYCydzVchBF3Y2VO+EYFzjht4gPIweQR7Vpkggo5z4vYNBY5aeqzhbb8uObaiG3ofQDJT5LprzulgL34L0t0FYzgjd1/YZ7eoIuEzcy27/jYHn/oG2V9f/0dHydsDCyFw5FYQPv38DgRkutBScyZYx86wR7I6o+HaPSvBkoPepjtOPDIn6Qd8o6aoHrqGgAFYLlSs2at744tmesu6FYwSL5hCcVhrjndFlPruWX4hPl8kND5A9629vhEkOQ4IqlV4K8NesXGR/+s4H72aEpd15OBAOKKR1i9kh0uEMZm8jgOJFqF2HM24n42kOY+Cfkg5w4QKKSRRHwwH0KZs6QsnF/oC0QGa21m12Tgo2Shs7tT5pKjkW3U8TVpZe6ZlsT2V/813nUDBc+nqZOk2o80xe6XPe5mEGrpX2BStKCxUhE9s28oRp3gWLkCQ9Bw6u1gf4heFNz0MK8vjlLnDZSuvvfXruarHZzoKIf86jBef7RQZ+JFTbtIXEcrx63b01cVWggYo+soCmU1q2BKFtuHT4t9dHlz3OLpcI2hAyd4L3g5+eqe/wPDmIaV0XMqMeCEYdIgl9VOkdIDIYAvXskELyhRUTOy74DifYykpDaDO+8a0ATPSIk000pBHFKokhA4ohna1C4diqFyW3cJm/2qebJfViU1Dm1dHW21b2tfRcCKkbbkv8uIyIU8QLKJ4aCZY15xGuWEVPjMVxHyV2ibzrioPJrqrgwlU5jIK/buqDJCezRmK7lQQcwVx6zHeJYsWhCFU7EGW31e86RMXjN5YM3Bn97FFCcLIZeaqdZ43wiVSNZqaYolsXxDPjTjO819aF6lvxfxkgTUHc20GpDnDSc6sC8xp/NZeZyISH4GmW93oJEtKOc6VXA5KA8gXZqDolLWkU5Et5EHbaZSo3nvv7NhSMjlXS34lOaUX619fX/S9SlQMmKc90ayEflOVftpJmCLf9f 1MG+GeTI n4mFSaQB7XJUtkqWzGYa6Crf7Atw6vgsh3Eeq8A0eSD8PAQ/Z1jdctx9qJKUc7vI2PmrjCmurgJHndS7h6rI8llVsbSvMxSQSYwGYRkV5IluzKSgfbF7ooE29cVzC6ulBwWoHk5sB9+SJ92Z3SgL1Avlo45xXUp5BlQQn1OnHY+WskAu1tYYRDRDIOFxWHgOKLlU39aKoEbAd6/ScdQIfmnADOYsso2ZGeCTSs0eSk/NBDVQXOla3brf0x7G+ylEJtPnCwiIvsdKFMCiuHf/in14JdcybnBLn1XJqrvwvIgzrNM8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Willem de Bruijn wrote: > struct bio_vec bvec; > struct msghdr msg =3D { .msg_flags =3D MSG_SPLICE_PAGES | ... }; > = > .. > = > bvec_set_virt > iov_iter_bvec > sock_sendmsg > = > is a frequent pattern. Does it make sense to define a wrapper? Same for = bvec_set_page. I dunno. I'm trying to move towards aggregating multiple pages in a bvec before calling sendmsg if possible rather than doing it one page at a time= , but it's easier and more obvious in some places than others. David