From patchwork Wed Aug 31 00:48:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 12960233 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 356E1ECAAA1 for ; Wed, 31 Aug 2022 00:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231626AbiHaAsq (ORCPT ); Tue, 30 Aug 2022 20:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbiHaAsq (ORCPT ); Tue, 30 Aug 2022 20:48:46 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83374E842; Tue, 30 Aug 2022 17:48:44 -0700 (PDT) Received: from localhost.localdomain (unknown [182.2.75.186]) by gnuweeb.org (Postfix) with ESMTPSA id 64C2C80B6D; Wed, 31 Aug 2022 00:48:41 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661906924; bh=+8I1uumCWG1OkrBQHCAZBfQtlAsV5zytkdAHrr1UCts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UR3ZQBDFUxxu0VnGOCRSGBr+IyvM6ZsVN2L97BFzFci5RbETlAu/W4QIFGjom7ehg Dk2cPk5t6xMeusYheeT/ONtEFfsb4KTH+c1kNnTZxnp4/ZCbtazIkOkdAaSlfF5niS Gj2Vfg2VDQvkeuDod5IwvKHVtrPWWTMohXq/MZVeq2rXxm0WV46phgQvtlTI9NQvuJ xF6AbEMhB2MV+4WkHUGHn53XL0Q9yzD5VYeeXtZFkf3eMiHce+da9rpYd1DmSRFISn zJQgzIqr7JQ5sTznRc+scEXttOlGc86+rg2o6/G7j5Cre08gGBg4bTKO3DeaaCJrwg mX2pXfzgA4odA== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Muhammad Rizki , Kanna Scarlet , io-uring Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List Subject: [PATCH liburing v1 1/3] github bot: Upgrade clang version to 16 Date: Wed, 31 Aug 2022 07:48:15 +0700 Message-Id: <20220831004449.2619220-2-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220831004449.2619220-1-ammar.faizi@intel.com> References: <20220831004449.2619220-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi clang-16 is now available, use it. Signed-off-by: Ammar Faizi --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 333929c..2608644 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,15 +91,15 @@ jobs: uses: actions/checkout@v2 - name: Install Compilers run: | if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \ wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \ - sudo bash /tmp/llvm.sh 15; \ - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 400; \ - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 400; \ + sudo bash /tmp/llvm.sh 16; \ + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 400; \ + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 400; \ else \ sudo apt-get update -y; \ sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; \ fi; - name: Display compiler versions From patchwork Wed Aug 31 00:48:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 12960234 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 BF8E2ECAAA1 for ; Wed, 31 Aug 2022 00:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbiHaAsw (ORCPT ); Tue, 30 Aug 2022 20:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231779AbiHaAst (ORCPT ); Tue, 30 Aug 2022 20:48:49 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE256F262; Tue, 30 Aug 2022 17:48:48 -0700 (PDT) Received: from localhost.localdomain (unknown [182.2.75.186]) by gnuweeb.org (Postfix) with ESMTPSA id A913180B71; Wed, 31 Aug 2022 00:48:44 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661906927; bh=iBes758DU4Vy6f+oLSWxX6fPMaaegbn7oMLvUt/NqyI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvG3K52V2xFj9l+0F6oortTAxl2OB6f874/jQ3eNby89r4j/+ciyDJ0+BaT+ZhO+O R0knMJRw8G8bb9ta/pgdo8bxu727ZcdnR2z8ZOnlVI1XpEFqriNWe53095Gg4RV0rA feIqYgiZK9uaEnbhB/gCZayJeOGwUulNQsiU1b+WerKl2OW3iUdpxw8Yeifetvkw47 BwW71GS4MO3N3gR6qR3dlPh+9Tg3GZlzehbm5opUfHiRnVml3J4myvFfU151gfGk/C I+1QMtFm6xWYsMTlLolPZMfw8kZvGvRYbb+qhQeXxo0560ofOfyvJZrTX5eiIC+J1r /c7iEHrVYJW4g== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Muhammad Rizki , Kanna Scarlet , io-uring Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List Subject: [PATCH liburing v1 2/3] CHANGELOG: Note about `io_uring_{enter,enter2,register,setup}` Date: Wed, 31 Aug 2022 07:48:16 +0700 Message-Id: <20220831004449.2619220-3-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220831004449.2619220-1-ammar.faizi@intel.com> References: <20220831004449.2619220-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi Commit f0b43c84cb3d1 ("syscall: Add io_uring syscall functions") exports 4 new functions. Mention it in the CHANGELOG file. Signed-off-by: Ammar Faizi --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 9c054b0..1f37e92 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,10 @@ liburing-2.3 release - Support non-libc build for aarch64. +- Add io_uring_{enter,enter2,register,setup} syscall functions. liburing-2.2 release - Support non-libc builds. - Optimized syscall handling for x86-64/x86/aarch64. From patchwork Wed Aug 31 00:48:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 12960235 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 0481CECAAD4 for ; Wed, 31 Aug 2022 00:49:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231971AbiHaAtA (ORCPT ); Tue, 30 Aug 2022 20:49:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbiHaAsx (ORCPT ); Tue, 30 Aug 2022 20:48:53 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EA394E601; Tue, 30 Aug 2022 17:48:51 -0700 (PDT) Received: from localhost.localdomain (unknown [182.2.75.186]) by gnuweeb.org (Postfix) with ESMTPSA id EF73580B61; Wed, 31 Aug 2022 00:48:47 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661906930; bh=OvuSN9WlWf8PL/Y35ukpx0DjD7WXaKShXli1j8KSvhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fff4rn4OgixjfaN/v6w2QI6tzh7s4pE+GGScnaUGulPIWvh4ogOxbCW5OQHeWGybN 3cg15BaZcwxDihi5q0lT5PEydcyFA+1XJeCJxDaujnDaB9bs7ouj7kQnUc5k6oPSHK AJ5aQgYTeLQdN8Fb1foRT1YAiiy4fDr149v/rVtFq0rvVFHXQDnSw3Ra4KGgfZwg8+ zuAHzHc+iyDUsfj2fYQfjypanh5eORBopSAHvxgqLW5HpyePH1E14faFRe5uEBRnjE aPRA0Wf+z3Zvqz1Qpjcf+cfzTy/B8YxtIs7k9rbKiEUXJp94Mf58K3kWhtwHVDo155 jELs2xHu41aNA== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Muhammad Rizki , Kanna Scarlet , io-uring Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List Subject: [PATCH liburing v1 3/3] queue: Remove unnecessary goto and label Date: Wed, 31 Aug 2022 07:48:17 +0700 Message-Id: <20220831004449.2619220-4-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220831004449.2619220-1-ammar.faizi@intel.com> References: <20220831004449.2619220-1-ammar.faizi@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org From: Ammar Faizi This 'goto done' and 'done:' label are not needed, there is no cleanup needed in this path. Simplify it. Just return 0 directly. Signed-off-by: Ammar Faizi --- src/queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/queue.c b/src/queue.c index 277cdcc..a670a8e 100644 --- a/src/queue.c +++ b/src/queue.c @@ -158,25 +158,24 @@ again: cqes[i] = &ring->cq.cqes[(head & mask) << shift]; return count; } if (overflow_checked) - goto done; + return 0; if (cq_ring_needs_flush(ring)) { int flags = IORING_ENTER_GETEVENTS; if (ring->int_flags & INT_FLAG_REG_RING) flags |= IORING_ENTER_REGISTERED_RING; __sys_io_uring_enter(ring->enter_ring_fd, 0, 0, flags, NULL); overflow_checked = true; goto again; } -done: return 0; } /* * Sync internal state with kernel ring state on the SQ side. Returns the * number of pending items in the SQ ring, for the shared ring.