All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
	Fernanda Ma'rouf <fernandafmr12@gnuweeb.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Hao Xu <howeyxu@tencent.com>,
	io-uring Mailing List <io-uring@vger.kernel.org>,
	GNU/Weeb Mailing List <gwml@gnuweeb.org>
Subject: Re: [PATCH liburing v2 0/8] aarch64 support
Date: Mon, 4 Jul 2022 22:36:54 +0700	[thread overview]
Message-ID: <cf2d0519-0fc8-0e17-a5b7-0548ef2868e6@gnuweeb.org> (raw)
In-Reply-To: <49ed1c4c-46ca-15c4-f288-f6808401b0ff@kernel.dk>

On 7/4/22 8:05 PM, Jens Axboe wrote:
> On 7/4/22 6:52 AM, Ammar Faizi wrote:
>> 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.

OK, I got the idea, folded that in.

Also, it seems we don't have any test that hits that get_page_size()
path. Do we?

I am going to create a new test:

    test/nolibc.c

That file will test the nolibc functionality, let's do get_page_size()
for starting. We can compare the result with a libc function like:

   long a = sysconf(_SC_PAGESIZE);
   long b = get_page_size();
   if (a != b) {
         fprintf(stderr, "get_page_size() fails, %ld != %ld", a, b);
         return T_EXIT_FAIL;
   }

-- 
Ammar Faizi

      reply	other threads:[~2022-07-04 15:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 17:58 [PATCH liburing v2 0/8] aarch64 support Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 1/8] CHANGELOG: Fixup missing space Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 2/8] arch: syscall: Add `__sys_open()` syscall Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 3/8] arch: syscall: Add `__sys_read()` syscall Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 4/8] arch: Remove `__INTERNAL__LIBURING_LIB_H` checks Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 5/8] arch/aarch64: lib: Add `get_page_size()` function Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 6/8] arch: Enable nolibc support for aarch64 Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 7/8] .github: Enable aarch64 nolibc build for GitHub bot Ammar Faizi
2022-06-29 17:58 ` [PATCH liburing v2 8/8] CHANGELOG: Note about aarch64 support Ammar Faizi
2022-07-04 12:52 ` [PATCH liburing v2 0/8] " Ammar Faizi
2022-07-04 13:05   ` Jens Axboe
2022-07-04 15:36     ` Ammar Faizi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf2d0519-0fc8-0e17-a5b7-0548ef2868e6@gnuweeb.org \
    --to=ammarfaizi2@gnuweeb.org \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=fernandafmr12@gnuweeb.org \
    --cc=gwml@gnuweeb.org \
    --cc=howeyxu@tencent.com \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.