From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [182.253.183.184]) by gnuweeb.org (Postfix) with ESMTPSA id 1A16C7E3C7; Fri, 6 Jan 2023 15:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1673019792; bh=yYZgSYnmlWmkpfH1MkyInsgHg0JmCJR27glBHkpEXpo=; h=From:To:Cc:Subject:Date:From; b=qr4qiL6oknxGyAc/jBfcpirJv4Na/6nJSbU71DiAMDNSr0/90DiGewgne2JVa+I++ r9M9Ps2etz8nDHbP39LpSzDNyizC3UyOTFbcB/QyDZU3pw4qLggSAnukfn0TM/Fbv0 ++tuuGa5GTrjl1hhKPSJr0eCvA0A2glCroTnvV1pQVzVhC3vTVtgzh35DGjxDijQ+R cvlojrk7ukth0ECiN0gPtdDPn2WSwaCD2d84nI30lu56KSMcMkvKJhj/z70QfNGvD8 J3fyitz+7PCE9rSh4d1MW9Ug7ff5e40XpmxRNJDc2gep7jcVPxBem8pzoVTmzlija5 2bITycApSld1Q== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Pavel Begunkov , Gilang Fachrezy , VNLX Kernel Department , Alviro Iskandar Setiawan , GNU/Weeb Mailing List , io-uring Mailing List Subject: [PATCH liburing v1 0/2] liburing micro-optimzation Date: Fri, 6 Jan 2023 22:42:57 +0700 Message-Id: <20230106154259.556542-1-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Ammar Faizi Hi Jens, This series contains liburing micro-optimzation. There are two patches in this series: ## Patch 1 - Fix bloated memset due to unexpected vectorization. Clang and GCC generate an insane vectorized memset() in nolibc.c. liburing doesn't need such a powerful memset(). Add an empty inline ASM to prevent the compilers from over-optimizing the memset(). ## Patch 2 - Simplify `io_uring_register_file_alloc_range()` function. Use a struct initializer instead of memset(). It simplifies the C code plus effectively reduces the code size. Signed-off-by: Ammar Faizi --- Ammar Faizi (2): nolibc: Fix bloated memset due to unexpected vectorization register: Simplify `io_uring_register_file_alloc_range()` function src/nolibc.c | 9 ++++++++- src/register.c | 9 ++++----- 2 files changed, 12 insertions(+), 6 deletions(-) base-commit: c76d392035fd271980faa297334268f2cd77d774 -- Ammar Faizi