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 C2021C433E0 for ; Fri, 5 Feb 2021 23:23:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7719E64FDE for ; Fri, 5 Feb 2021 23:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbhBEXXQ (ORCPT ); Fri, 5 Feb 2021 18:23:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbhBEJ7D (ORCPT ); Fri, 5 Feb 2021 04:59:03 -0500 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A74C0613D6 for ; Fri, 5 Feb 2021 01:58:22 -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=YRO6NFJkwwaBsMcfOTjrZj78NAmiG/R9d12G4x2q9ck=; b=worSeGdOMEBK5joug9sXRZIWaQ G5Kvl3d04cY/x6kCpqKfRWZo9jmG9a6EKwbzAnfOYj2rmaeEDjtBspiGJ+uBObAtm3n9ETCyB4Fei /eDltmJwUU10/e68MdcYSNnkoThx1z4KgvYUiq8yRcZ2u8MjFOox5Rw3kvxDSqSKsCEXP6DD5pZE9 Pk6i8G/ds5j4/svoqfRtUZ9SdKkrVJiHeDzBQBUwGVG08lZ28VtjuvW68vkSsUkU3XsWgLdjM+dqF y5bO7l8OaT63QQzLC7LhdI/W7eweLSGaK0iYdyOJIgbymc9SxgS9SK2NmIUfG7idnRsmYIAiLcKMB sKy0NgSBLuBzGcz10MTPmgR0F0tjdXE3lIOOFciEwCc4lbyrZiWTnCyzSxX6W8lx1dRchNVjbU5+S fH3LMngS8bTQBSfusZ6iPV/tIFEBIn52TTjfidkxp4M95A1wB7VFl8xcFHjvxrJ30/hgd7cP/1p44 U1tClwupkeke7ZNo4YUR79n1; 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 1l7xsa-00037o-RX; Fri, 05 Feb 2021 09:58:20 +0000 To: Pavel Begunkov , Jens Axboe , io-uring@vger.kernel.org References: <3aae2e7d-0405-7f5b-9062-5eca9df13e74@gmail.com> From: Stefan Metzmacher Autocrypt: addr=metze@samba.org; prefer-encrypt=mutual; keydata= mQQNBFYI3MgBIACtBo6mgqbCv5vkv8GSjJH607nvXIT65moPUe6qAm2lYPP6oZUI5SNLhbO3 rMYfMxBFfWS/0WF8840mDvhqPI+lJGfvJ1Y2r8a9JPuqsk6vwLedv62TQe5J3qMCR2y4TTK1 Pkqss3P9kqWn5SVXntAYjLT06Qh96gQ9la9qwj6+izqMdAoGFt5ak7Sw7jJ06U3AawZDawb2 +4q7KwaDwTWeUifIC54tXp+au5Q17rhKq94LTcdptkLfC5ix2cyApsr84El/82LFUOzZdyRA 7VS8gkhuAZG7tM1MbCIbGk0O3SFlT+CvZczfjtoxVdjYvGRDwBFlSIUwo3Os2aStstvYog7r r9vujWGSf5odBSogRvACCFwuGLVUBSBw/If0Wb0WgHnkdVcKfjNpznBqUfG6mGh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Jt uAMlsTqBMFOwuvAcYAj2bwl7QQU6yhU= Subject: Re: [PATCH 3/3] io_uring: refactor sendmsg/recvmsg iov managing Message-ID: <526757c3-49e4-33e6-5295-378a6b8c8df7@samba.org> Date: Fri, 5 Feb 2021 10:58:16 +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: <3aae2e7d-0405-7f5b-9062-5eca9df13e74@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BIV9l2DE3fCy6pstd9JXBywUR5CRrZcwJ" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BIV9l2DE3fCy6pstd9JXBywUR5CRrZcwJ Content-Type: multipart/mixed; boundary="XHgriQxcmczX18s7Kxc5H8FxGZZ1OATNP"; protected-headers="v1" From: Stefan Metzmacher To: Pavel Begunkov , Jens Axboe , io-uring@vger.kernel.org Message-ID: <526757c3-49e4-33e6-5295-378a6b8c8df7@samba.org> Subject: Re: [PATCH 3/3] io_uring: refactor sendmsg/recvmsg iov managing References: <3aae2e7d-0405-7f5b-9062-5eca9df13e74@gmail.com> In-Reply-To: <3aae2e7d-0405-7f5b-9062-5eca9df13e74@gmail.com> --XHgriQxcmczX18s7Kxc5H8FxGZZ1OATNP 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 f= ast_iov? >=20 > That's a part of __import_iovec() and sendmsg_copy_msghdr() API, you pa= ss > fast_iov as such and get back NULL or a newly allocated one in it. I think that should at least get a comment to make this clear and maybe a temporary variable like this: tmp_iov =3D iomsg->fast_iov; __import_iovec(..., &tmp_iov, ...); iomsg->free_iov =3D tmp_iov; >>> @@ -4872,8 +4867,8 @@ static int io_recvmsg(struct io_kiocb *req, boo= l 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 fun= ction call? >=20 > Yes, the hot path here is not having iov allocated, and Jens told befor= e > that he had observed overhead for a similar place in io_[read,write]. Ok, a comment would also help here... metze --XHgriQxcmczX18s7Kxc5H8FxGZZ1OATNP-- --BIV9l2DE3fCy6pstd9JXBywUR5CRrZcwJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfFbGo3YXpfgryIw9DbX1YShpvVYFAmAdFrgACgkQDbX1YShp vVZxoQ/8CEOhUvaO3JRGQd5ZqAKtJrOfDUbxsvWzhfNztaydYolKqqLwZokaPwk5 DQlJpitWFPzc+ig9J2HzW6N0y9ja7uhrWbfOeKijHiCohHIU0ArEyO2CDps6+THy 577ovwnviXz9ph3TdxT8icYc/4QRA+DMrCXJDNP8EY0dZyuDieoDBwqQ2FoIPZiF BDt07VskKmvjV40S6V/GTSV68UM8+afgwDgioFIBl8YzP/GyMmWhUkLHvCrffl3D PB7MOTrnHym5hGH5LrGu+sCpe0IHOHESeRtzQvB+7RFANcOej8RaKAJGlSgkfM80 r0Ulfwj6hh5pAqYK0PwCXBqLVs9/741yokO2L4Spf3jrsWKQgCqJjyLpo1fYaqHP wZB1LQieV7YqyA2tMiEpRf3gV2DWmRdSb/iVBVGg7ofua80DUuy4jTkDJ3LUY9zl 1S9GoAzy/WwvWKO92SOSHOUmLMLmI8t55Okk5h0eaVbNP3T0/yhc0yKXHIiqom9P OYJOyExh5bo3BthIenBrZJKAFElda9iePeNSG6jKARK+lx5W0gOUAUV5M9Nm/cKi PnnuaKWfna8EZ0ie4IdZCrNUSlM2WHU1cfwwdInBnFwA+BiA9SsL3UNcsB+2erJQ FfhIwYPR7hVfiY8rJsT8dbwmKwFhQNtku5JdQvmI7rOVHdZ0Jrw= =tGRh -----END PGP SIGNATURE----- --BIV9l2DE3fCy6pstd9JXBywUR5CRrZcwJ--