construct: Support IORING_SETUP_SINGLE_ISSUER (Linux 6.0)
This commit is contained in:
parent
13f3d1ebc6
commit
63c70ecdfc
|
@ -50,6 +50,7 @@ const char *diagnostic;
|
||||||
bool nobanner;
|
bool nobanner;
|
||||||
bool silentmode;
|
bool silentmode;
|
||||||
bool noiouct;
|
bool noiouct;
|
||||||
|
bool noioust;
|
||||||
|
|
||||||
lgetopt opts[]
|
lgetopt opts[]
|
||||||
{
|
{
|
||||||
|
@ -87,6 +88,7 @@ lgetopt opts[]
|
||||||
{ "nobanner", &nobanner, lgetopt::BOOL, "Terminal log enabled only in runlevel RUN" },
|
{ "nobanner", &nobanner, lgetopt::BOOL, "Terminal log enabled only in runlevel RUN" },
|
||||||
{ "silent", &silentmode, lgetopt::BOOL, "Like quiet mode without console output either" },
|
{ "silent", &silentmode, lgetopt::BOOL, "Like quiet mode without console output either" },
|
||||||
{ "noiouct", &noiouct, lgetopt::BOOL, "Disable experimental IORING_SETUP_COOP_TASKRUN" },
|
{ "noiouct", &noiouct, lgetopt::BOOL, "Disable experimental IORING_SETUP_COOP_TASKRUN" },
|
||||||
|
{ "noioust", &noioust, lgetopt::BOOL, "Disable experimental IORING_SETUP_SINGLE_ISSUER" },
|
||||||
{ nullptr, nullptr, lgetopt::STRING, nullptr },
|
{ nullptr, nullptr, lgetopt::STRING, nullptr },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -683,17 +685,28 @@ __wrap_io_uring_queue_init(unsigned entries,
|
||||||
{
|
{
|
||||||
namespace info = ircd::info;
|
namespace info = ircd::info;
|
||||||
|
|
||||||
|
#if defined(IORING_SETUP_COOP_TASKRUN)
|
||||||
const bool have_coop_taskrun
|
const bool have_coop_taskrun
|
||||||
{
|
{
|
||||||
info::kernel_version[0] > 5 ||
|
info::kernel_version[0] > 5 ||
|
||||||
(info::kernel_version[0] >= 5 && info::kernel_version[1] >= 19)
|
(info::kernel_version[0] >= 5 && info::kernel_version[1] >= 19)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(IORING_SETUP_COOP_TASKRUN)
|
|
||||||
if(have_coop_taskrun && !noiouct)
|
if(have_coop_taskrun && !noiouct)
|
||||||
flags |= IORING_SETUP_COOP_TASKRUN;
|
flags |= IORING_SETUP_COOP_TASKRUN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(IORING_SETUP_SINGLE_ISSUER)
|
||||||
|
const bool have_single_issuer
|
||||||
|
{
|
||||||
|
info::kernel_version[0] > 6 ||
|
||||||
|
(info::kernel_version[0] >= 6 && info::kernel_version[1] >= 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
if(have_single_issuer && !noioust)
|
||||||
|
flags |= IORING_SETUP_SINGLE_ISSUER;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct io_uring_params params
|
struct io_uring_params params
|
||||||
{
|
{
|
||||||
.flags = flags,
|
.flags = flags,
|
||||||
|
|
Loading…
Reference in New Issue