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 mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by gnuweeb.org (Postfix) with ESMTPSA id 7E6DE800C8; Wed, 29 Jun 2022 00:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1656463867; bh=j4bgt2Nap7QsxlIx7gCY31nLYxfnSRev6A9CMuOHaKA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IHmnFlHMp6L1MoO3bVYrLF3sftfmL9xs2m1ltHS/PotIHFUkkdyy7g5p0PWD6nI08 OXzfDI8ewbZ2uxr6pPvd/bSsjnogROR+sPL8F+3ybk8FOMnPc+uFI0xK0XX8KzvUyD EyIrWZygNF+tW27bi82tZNYAZ2NANi6UO1nPBUJRHTDFTVwaKS/CJ4AAPe41KG+Xf3 oWhdRrk6R2TZxrNe2WIG10ae8Lz61K2/KnwwGDYp3edFbY/AEWLipm3MYfvAGrXk1X AdMlfgl2l+KZk0xnJ9lRFOWfEJ5MMPpjNUozMiiVRts9Mz1zbBTWmps9rBv1dsXe0X 6Rvt+3VbvgJyg== Received: by mail-lf1-f51.google.com with SMTP id z21so25152082lfb.12; Tue, 28 Jun 2022 17:51:07 -0700 (PDT) X-Gm-Message-State: AJIora+l0xZoW+FvXiS+fHAtqXXp270X3wXaM0kxCjd3XboK2bt5htBI peBBHbRZL/9dbUXlSYdxm9DdrNxQ8YcgQ6bkp5o= X-Google-Smtp-Source: AGRyM1tWtFYYO1i4vS2amTwAM54ARtXuazRlV3bc1V/IVS85e09CLUeF5IRI23beFJaNoLhDvt/IG6209cGnPFV/pXU= X-Received: by 2002:a05:6512:3a88:b0:481:4bb:3246 with SMTP id q8-20020a0565123a8800b0048104bb3246mr405098lfu.292.1656463865648; Tue, 28 Jun 2022 17:51:05 -0700 (PDT) MIME-Version: 1.0 References: <20220629002028.1232579-1-ammar.faizi@intel.com> <20220629002028.1232579-3-ammar.faizi@intel.com> In-Reply-To: <20220629002028.1232579-3-ammar.faizi@intel.com> From: Alviro Iskandar Setiawan Date: Wed, 29 Jun 2022 07:50:54 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH liburing v1 2/9] setup: Handle `get_page_size()` failure (for aarch64 nolibc support) To: Ammar Faizi Cc: Jens Axboe , "Fernanda Ma'rouf" , Pavel Begunkov , Hao Xu , io-uring Mailing List , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Wed, Jun 29, 2022 at 7:28 AM Ammar Faizi wrote: > page_size = get_page_size(); > + if (page_size < 0) > + return page_size; > + > return rings_size(p, entries, cq_entries, page_size); > } the current error handling fallback to 4K if fail on sysconf(_SC_PAGESIZE): https://github.com/axboe/liburing/blob/68103b731c34a9f83c181cb33eb424f46f3dcb94/src/arch/generic/lib.h#L10-L19 with this patch, get_page_size() is only possible to return negative value on aarch64. i don't understand why the current master branch code fallback to 4K when fail? tq -- Viro