| From: | Steven Niu <niushiji(at)gmail(dot)com> |
|---|---|
| To: | Andreas Karlsson <andreas(at)proxel(dot)se>, Pierre <pierre(dot)forstmann(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] check kernel version for io_method |
| Date: | 2026-01-14 02:31:24 |
| Message-ID: | MN2PR15MB30219C300249CA008F144614A78FA@MN2PR15MB3021.namprd15.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
From: Andreas Karlsson <andreas(at)proxel(dot)se>
Sent: Wednesday, January 14, 2026 09:07
To: Pierre <pierre(dot)forstmann(at)gmail(dot)com>; pgsql-hackers(at)lists(dot)postgresql(dot)org <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] check kernel version for io_method
On 1/13/26 11:05 PM, Pierre wrote:
> Please find a patch proposal for bug BUG #19369: Not documented that
> io_uring on kernel versions between 5.1 and below 5.6 does not work.
Wouldn't it make more sense to use io_uring_get_probe_ring() and
io_uring_opcode_supported() to actually check for the required opcode?
Then if someone uses a Kernel with the required features backported
everything will still work.
Andreas
+1
It would be more reliable to check the availability of io_uring feature than to check OS version.
BTW, the error message in the following code block is wrong as it locates in branch that IO_URING is not enabled.
#else
+ if (*newval == IOMETHOD_WORKER || *newval == IOMETHOD_SYNC)
+ {
+ /*
+ * OK
+ */
+ }
+ else
+ {
+ GUC_check_errdetail("io_uring requires Linux kernel 5.6 or later.");
+ return false;
+ }
Thanks,
Steven
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Karlsson | 2026-01-14 02:38:10 | Re: Add IS_INDEX macro to brin and gist index |
| Previous Message | Chao Li | 2026-01-14 02:26:07 | Re: Buffer locking is special (hints, checksums, AIO writes) |