public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Haiyue Wang <haiyuewa@163.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH liburing v1] zcrx: Get the page size at runtime
Date: Sun, 20 Apr 2025 00:51:26 +0800	[thread overview]
Message-ID: <9c76875c-fab5-4248-ab6b-9a1ac8765fad@163.com> (raw)
In-Reply-To: <debd0318-2d0c-4e0e-80c0-b47acbf93987@kernel.dk>

On 2025/4/19 23:12, Jens Axboe wrote:
> On 4/19/25 7:38 AM, Haiyue Wang wrote:
>> Use the API `sysconf()` to query page size at runtime, instead of using
>> hard code number 4096.
> 
> This is v2, no? It's customary to include a "changes since the last
> version" when posting a v2. JFYI.
> 

Got it. Will send v3, fix the tab issue.

>> @@ -329,7 +329,13 @@ static void parse_opts(int argc, char **argv)
>>   
>>   int main(int argc, char **argv)
>>   {
>> -	parse_opts(argc, argv);
>> +	page_size = sysconf(_SC_PAGESIZE);
>> +	if (page_size < 0) {
>> +		perror("sysconf(_SC_PAGESIZE)");
>> +		return 1;
>> +	}
>> +
>> +        parse_opts(argc, argv);
> 
> Whitespace damage here, it's using spaces rather than tabs.
> 
> Outside of that, I think this looks fine. liburing helpers should
> probably have something for this going forward, so every test that uses
> the correct page size (or still hardcodes 4096...) would get it right
> without needing to know about this. But that's beyond the scope of this
> change.
> 


      reply	other threads:[~2025-04-19 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-19 13:38 [PATCH liburing v1] zcrx: Get the page size at runtime Haiyue Wang
2025-04-19 15:12 ` Jens Axboe
2025-04-19 16:51   ` Haiyue Wang [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=9c76875c-fab5-4248-ab6b-9a1ac8765fad@163.com \
    --to=haiyuewa@163.com \
    --cc=axboe@kernel.dk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox