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 X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74D49C433DB for ; Fri, 5 Feb 2021 07:55:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2122E64F97 for ; Fri, 5 Feb 2021 07:55:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231207AbhBEHzy (ORCPT ); Fri, 5 Feb 2021 02:55:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230406AbhBEHzx (ORCPT ); Fri, 5 Feb 2021 02:55:53 -0500 X-Greylist: delayed 2220 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 04 Feb 2021 23:55:13 PST Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073ABC0613D6 for ; Thu, 4 Feb 2021 23:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Date:Message-ID:From:To:CC; bh=uzQIhVjJ0/EWwNX+vyAb7i29Uj2Gdh1j8DD1D3kQE+w=; b=GCa1sEKHIW4YvLs9lqRtu6akIF waLs92/vJVOjkuK78UhhzawyHCTJypS0g/ST5wYbKZILUAU3cwbnQA5rNpXgQmW7na71/i5i9MnT/ JhA1PtowHxSjtwRkPVqv4opNQPYfBVfoqr2Hf9tibXczuIsLgyTDOAwAWU52nFR1HEotOnZiR3ETh 8B/iC+AonPyk86YeKHFVcaHNFsvndQeneBoqbGp2906DmL783TgX/obJt2QINtJEFKuMIDs6+B6z1 IzgXkJHKwCVN/8qmoaib4qcNzA/XXBPB6SOk6zT/d07DpAk7geP/rmMhzeMHNkW+9b2Soa5p0urvb CXaPqneq2LTbYbVfM1mMnY3rvlez38Ia5ssTVgUSSCRs2UwlLL/F3S6B7YN1g0cBflV3v64533zrk h+OO1zIe7Zd6RepwcCpazDmldcta4jhjs9/VnXwRrGTgirLnlGOvIgVg+KllQcF6meS900XciRuoI dwbcmd3xtgTyXX9kLQAGV6d0; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1l7vNa-0001eV-89; Fri, 05 Feb 2021 07:18:10 +0000 To: Pavel Begunkov , Jens Axboe , io-uring@vger.kernel.org References: From: Stefan Metzmacher Autocrypt: addr=metze@samba.org; prefer-encrypt=mutual; keydata= mQQNBFYI3MgBIACtBo6mgqbCv5vkv8GSjJH607nvXIT65moPUe6qAm2lYPP6oZUI5SNLhbO3 rMYfMxBFfWS/0WF8840mDvhqPI+lJGfvJ1Y2r8a9JPuqsk6vwLedv62TQe5J3qMCR2y4TTK1 Pkqss3P9kqWn5SVXntAYjLT06Qh96gQ9la9qwj6+izqMdAoGFt5ak7Sw7jJ06U3AawZDawb2 +4q7KwaDwTWeUifIC54tXp+au5Q17rhKq94LTcdptkLfC5ix2cyApsr84El/82LFUOzZdyRA 7VS8gkhuAZG7tM1MbCIbGk0O3SFlT+CvZczfjtoxVdjYvGRDwBFlSIUwo3Os2aStstvYog7r r9vujWGSf5odBSogRvACCFwuGLVUBSBw/If0Wb0WgHnkdVcKf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puoxdZRA0i7PmJt uAMlsTqBMFOwuvAcYAj2bwl7QQU6yhU= Subject: Re: [PATCH 3/3] io_uring: refactor sendmsg/recvmsg iov managing Message-ID: Date: Fri, 5 Feb 2021 08:17:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mSLEdrzzPrBTSrhHN0RtXKErAz9UJ0rid" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mSLEdrzzPrBTSrhHN0RtXKErAz9UJ0rid Content-Type: multipart/mixed; boundary="mSoRR9QCpR8QBYamqP2WHjLAvkU2nHsEm"; protected-headers="v1" From: Stefan Metzmacher To: Pavel Begunkov , Jens Axboe , io-uring@vger.kernel.org Message-ID: Subject: Re: [PATCH 3/3] io_uring: refactor sendmsg/recvmsg iov managing References: In-Reply-To: --mSoRR9QCpR8QBYamqP2WHjLAvkU2nHsEm Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Pavel, > static int io_sendmsg_copy_hdr(struct io_kiocb *req, > struct io_async_msghdr *iomsg) > { > - iomsg->iov =3D iomsg->fast_iov; > iomsg->msg.msg_name =3D &iomsg->addr; > + iomsg->free_iov =3D iomsg->fast_iov; Why this? Isn't the idea of this patch that free_iov is never =3D=3D fast= _iov? > @@ -4704,10 +4703,11 @@ static int __io_recvmsg_copy_hdr(struct io_kioc= b *req, > if (copy_from_user(iomsg->fast_iov, uiov, sizeof(*uiov))) > return -EFAULT; > sr->len =3D iomsg->fast_iov[0].iov_len; > - iomsg->iov =3D NULL; > + iomsg->free_iov =3D NULL; > } else { > + iomsg->free_iov =3D iomsg->fast_iov; The same here... > ret =3D __import_iovec(READ, uiov, iov_len, UIO_FASTIOV, > - &iomsg->iov, &iomsg->msg.msg_iter, > + &iomsg->free_iov, &iomsg->msg.msg_iter, > false); > if (ret > 0) > ret =3D 0; > @@ -4746,10 +4746,11 @@ static int __io_compat_recvmsg_copy_hdr(struct = io_kiocb *req, > if (clen < 0) > return -EINVAL; > sr->len =3D clen; > - iomsg->iov =3D NULL; > + iomsg->free_iov =3D NULL; > } else { > + iomsg->free_iov =3D iomsg->fast_iov; And here... > ret =3D __import_iovec(READ, (struct iovec __user *)uiov, len, > - UIO_FASTIOV, &iomsg->iov, > + UIO_FASTIOV, &iomsg->free_iov, > &iomsg->msg.msg_iter, true); > if (ret < 0) > return ret; > @@ -4872,8 +4867,8 @@ static int io_recvmsg(struct io_kiocb *req, bool = force_nonblock, > =20 > if (req->flags & REQ_F_BUFFER_SELECTED) > cflags =3D io_put_recv_kbuf(req); > - if (kmsg->iov !=3D kmsg->fast_iov) > - kfree(kmsg->iov); > + if (kmsg->free_iov) > + kfree(kmsg->free_iov); kfree() handles NULL, or is this a hot path and we want to avoid a functi= on call? metze --mSoRR9QCpR8QBYamqP2WHjLAvkU2nHsEm-- --mSLEdrzzPrBTSrhHN0RtXKErAz9UJ0rid Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfFbGo3YXpfgryIw9DbX1YShpvVYFAmAc8SUACgkQDbX1YShp vVbcPQ/8D/urraITLF6Z+K6dUNSOJqINoGBVDnAP0nUnNQobr3W+b+0yJRhZrEOM EldCCreHkfEN+MwJoL2WEOS7ZrOTFX1vSxX+7SC9fEPTuFto8jkFlp/QINWjOONV VHNWPhCup6t/2utyE/93oFKOXuxMNOG5adsJxEmpOMq+fj594X5IEIjZ0u/HrFjX tlpd/dEGgEu7EZBPHQkQ6eTSArPcO93/Ezansr1BSQax6h9qHGfpNEBUCXdCEQIk pYfrpKlN0I/+P5l5PfpOikQaSrO+AOm4DFnn2ZY8r+iPITDbBSbXxBSLOZ8Erc4e 7mV9sPMNI+/jYZM/Qqw4eUN4Ubc2e4JVg3wDFZddq2hCRPSqvsTH+yUA2lNj9m64 V+Zprb27V8085lRGBvIshI5Vyr6RVNntkV32DeQV2YX9oKcX3vrGLfXMK64CL074 5QLinM8rGoNctTV3f6NZQzhMwgpVd825yKrH56oDvplzTdYaR/T/kL17Xy2VUGLN /VWNwRuFw1T1vAuK8Tq+xynkKUhLCMU/NJICIxlLA2pl76A+km/4pCm1JFcd8wcK H+Qxjum6wPFhOFuHgPrTwxW2mDyj7n/upDBHklkxFOwpE2zAz+NkhJECAUzEk7WF Yjn6kDTWKZMt/RLkkdT7+F4Z4gpz5FSr2Th3pwyUJtocM6596O4= =cSRN -----END PGP SIGNATURE----- --mSLEdrzzPrBTSrhHN0RtXKErAz9UJ0rid--