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=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by gnuweeb.org (Postfix) with ESMTPS id E6FEB8022E for ; Mon, 4 Jul 2022 13:06:15 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=kernel-dk.20210112.gappssmtp.com header.i=@kernel-dk.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=AAgKK/BY; dkim-atps=neutral Received: by mail-pl1-f178.google.com with SMTP id z1so2741079plb.1 for ; Mon, 04 Jul 2022 06:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=QVCktmojyxDw4dh+cExU/9zgrqHUEBaF+AFzKLRJmMY=; b=AAgKK/BYCF+30tS76ZV+SUwPtRRnHbrv1+Ne0Mh2dJ0m6e1CrqR/pvgCd1F4DfX9++ 2LuVSQFn0ezKYnSCdsLXn1XnXMMsf6mMC2jtWunkJdN8u8mCxfmDH9Sd28Pl46xLaU9b lYzGw4kibcH3MTYmBKsgqfSkY3Hpoq9sht35mOqJ8J1znjPuSWN6K2JrhwYkxBTh8I8s lgNsveO80Zu40Zxqk4yVHImsTIU8XhdA8ZjHEEnWRUPrDtYGb2tqrj4kGF+h8x6IsdmW ftQun8hdwGDMLDaza7KweCH9ZYIw/JyQVcXcv83GMJFcPh+nh4Eiwn8IuK7gNd/UawdR 3Nvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=QVCktmojyxDw4dh+cExU/9zgrqHUEBaF+AFzKLRJmMY=; b=ngHe7//hGRqD5vALhuvPWzuzvPR7KyH+EL6Vw8LxSIX9mMfqOeyETCZ7yrdj5oXidZ hrrYSAM7jQACJ2DrjtjaNCP9QdssRSlGydkyen9ub0o+hw/9B+npTa3Dmhu5yLHFFFJV cErybJwE1TQf6FzpbMaxOeZOLSo1vPfPlDGvkN+HRsPZL2EeuLmjQ4zhA8ucogIdngDr lN4KEW5al5tqhHxPQfTUAG98WhyJcyJdUUgloI5OAnIBV5/HfmngB87EAtEBmo3cZOVs C7D5PsQhm6sxuCoGMdjVp7YQzeD35Lf2YLfUSZv+wCozadhg4w3cSTX1jba8OJsUpJKP fPXA== X-Gm-Message-State: AJIora/Mi81ccVL4t8vaHYRFrS+7zuUJnc53luO4m2e/pVAqPba4F4oA ut4C1P8zqj+9bsGyVzbGqZGAuw== X-Google-Smtp-Source: AGRyM1tIZ4qdXMFB9zbxYyMrCAEoffY3XMs3KvCKUXcoehYwMIxNPnY4muz1r6B5C6LZQyDylpO/Hg== X-Received: by 2002:a17:90b:f86:b0:1ef:90f2:884c with SMTP id ft6-20020a17090b0f8600b001ef90f2884cmr1381343pjb.91.1656939915418; Mon, 04 Jul 2022 06:05:15 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id z19-20020a17090ab11300b001d95c09f877sm5544998pjq.35.2022.07.04.06.05.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jul 2022 06:05:15 -0700 (PDT) Message-ID: <49ed1c4c-46ca-15c4-f288-f6808401b0ff@kernel.dk> Date: Mon, 4 Jul 2022 07:05:13 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH liburing v2 0/8] aarch64 support Content-Language: en-US To: Ammar Faizi Cc: Alviro Iskandar Setiawan , Fernanda Ma'rouf , Pavel Begunkov , Hao Xu , io-uring Mailing List , GNU/Weeb Mailing List References: <20220629175255.1377052-1-ammar.faizi@intel.com> <073c02c4-bddc-ab35-545f-fe81664fac13@gnuweeb.org> From: Jens Axboe In-Reply-To: <073c02c4-bddc-ab35-545f-fe81664fac13@gnuweeb.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: On 7/4/22 6:52 AM, Ammar Faizi wrote: > On 6/30/22 12:58 AM, Ammar Faizi wrote: >> From: Ammar Faizi >> >> Hi Jens, >> >> This is v2 revision of aarch64 support. >> >> This series contains nolibc support for aarch64 and one extra irrelevant >> cleanup (patch #1). The missing bit from aarch64 is get_page_size() >> which is a bit complicated to implement without libc. >> >> aarch64 supports three values of page size: 4K, 16K, and 64K which are >> selected at kernel compilation time. Therefore, we can't hard code the >> page size for this arch. In this series we utilize open(), read() and >> close() syscall to find the page size from /proc/self/auxv. >> >> The auxiliary vector contains information about the page size, it is >> located at `AT_PAGESZ` keyval pair. > > This no longer applies, I will send v3 revision soon. If you have some > comments, let me know so I can address it together with the rebase. Just send a v3, didn't have time to go fully over it yet. One note, though - for patch 5, I'd split get_page_size() into two pieces so you just do: static inline long get_page_size(void) { static long cache_val; if (cache_val) return cache_val; return __get_page_size(); } With that, we can have __get_page_size() just do that one thing, open the file and read the value. No need to init static variables to 0. And finally, if the read/open/whatever fails in __get_page_size(), assign cache_val to the fallback value as well. I don't see a point in retrying the same operation later and expect a different result. -- Jens Axboe