Package io.netty.channel.uring
Class IoUring
- java.lang.Object
-
- io.netty.channel.uring.IoUring
-
public final class IoUring extends java.lang.Object
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description privateIoUring()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidensureAvailability()static java.lang.StringfeatureString()Returns a string representation of the io_uring support and feature set.static booleanisAcceptMultishotEnabled()Returns if multi-shot ACCEPT is used or not.(package private) static booleanisAcceptMultishotSupported()(package private) static booleanisAcceptNoWaitSupported()static booleanisAvailable()(package private) static booleanisCqeFSockNonEmptySupported()static booleanisIoringEnterNoIoWaitEnabled()Returns ifIORING_ENTER_NO_IOWAITis used or not.(package private) static booleanisIoringEnterNoIoWaitSupported()(package private) static booleanisIoringSetupNoSqarraySupported()static booleanisPollAddMultishotEnabled()Returns if multi-shot POLL_ADD is used or not.(package private) static booleanisPollAddMultishotSupported()static booleanisRecvMultishotEnabled()Returns if multi-shot RECV is used or not.(package private) static booleanisRecvMultishotSupported()static booleanisRecvsendBundleEnabled()Returns if RECVSEND bundles are used or not.(package private) static booleanisRecvsendBundleSupported()static booleanisRegisterBufferRingIncSupported()Returns if it is supported to use an incremental buffer ring.static booleanisRegisterBufferRingSupported()Returns if it is supported to use a buffer ring.(package private) static booleanisRegisterIowqMaxWorkersSupported()(package private) static booleanisSendmsgZcSupported()Returns ifIORING_OP_SENDMSG_ZCis supported.(package private) static booleanisSendZcSupported()Returns ifIORING_OP_SEND_ZCis supported.(package private) static booleanisSetupCqeMixedSupported()(package private) static booleanisSetupCqeSizeSupported()(package private) static booleanisSetupDeferTaskrunSupported()(package private) static booleanisSetupSingleIssuerSupported()(package private) static booleanisSetupSubmitAllSupported()static booleanisSpliceSupported()Returns if SPLICE is supported or not.static booleanisTcpFastOpenClientSideAvailable()Returnstrueif the io_uring native transport is both available and supports client-side TCP FastOpen.static booleanisTcpFastOpenServerSideAvailable()Returnstrueif the io_uring native transport is both available and supports server-side TCP FastOpen.(package private) static booleanisUnixDomainSocketInqSupported()(package private) static longmemoryAddress(ByteBuf buffer)private static java.lang.StringsupportedFeatures()java.lang.StringtoString()static java.lang.ThrowableunavailabilityCause()
-
-
-
Field Detail
-
UNAVAILABILITY_CAUSE
private static final java.lang.Throwable UNAVAILABILITY_CAUSE
-
IORING_CQE_F_SOCK_NONEMPTY_SUPPORTED
private static final boolean IORING_CQE_F_SOCK_NONEMPTY_SUPPORTED
-
UNIX_DOMAIN_SOCKET_INQ_SUPPORTED
private static final boolean UNIX_DOMAIN_SOCKET_INQ_SUPPORTED
-
IORING_SPLICE_SUPPORTED
private static final boolean IORING_SPLICE_SUPPORTED
-
IORING_SEND_ZC_SUPPORTED
private static final boolean IORING_SEND_ZC_SUPPORTED
-
IORING_SENDMSG_ZC_SUPPORTED
private static final boolean IORING_SENDMSG_ZC_SUPPORTED
-
IORING_ACCEPT_NO_WAIT_SUPPORTED
private static final boolean IORING_ACCEPT_NO_WAIT_SUPPORTED
-
IORING_ACCEPT_MULTISHOT_SUPPORTED
private static final boolean IORING_ACCEPT_MULTISHOT_SUPPORTED
-
IORING_RECV_MULTISHOT_SUPPORTED
private static final boolean IORING_RECV_MULTISHOT_SUPPORTED
-
IORING_RECVSEND_BUNDLE_SUPPORTED
private static final boolean IORING_RECVSEND_BUNDLE_SUPPORTED
-
IORING_POLL_ADD_MULTISHOT_SUPPORTED
private static final boolean IORING_POLL_ADD_MULTISHOT_SUPPORTED
-
IORING_REGISTER_IOWQ_MAX_WORKERS_SUPPORTED
private static final boolean IORING_REGISTER_IOWQ_MAX_WORKERS_SUPPORTED
-
IORING_SETUP_SUBMIT_ALL_SUPPORTED
private static final boolean IORING_SETUP_SUBMIT_ALL_SUPPORTED
-
IORING_SETUP_CQE_MIXED_SUPPORTED
private static final boolean IORING_SETUP_CQE_MIXED_SUPPORTED
-
IORING_SETUP_CQ_SIZE_SUPPORTED
private static final boolean IORING_SETUP_CQ_SIZE_SUPPORTED
-
IORING_SETUP_SINGLE_ISSUER_SUPPORTED
private static final boolean IORING_SETUP_SINGLE_ISSUER_SUPPORTED
-
IORING_SETUP_DEFER_TASKRUN_SUPPORTED
private static final boolean IORING_SETUP_DEFER_TASKRUN_SUPPORTED
-
IORING_SETUP_NO_SQARRAY_SUPPORTED
private static final boolean IORING_SETUP_NO_SQARRAY_SUPPORTED
-
IORING_REGISTER_BUFFER_RING_SUPPORTED
private static final boolean IORING_REGISTER_BUFFER_RING_SUPPORTED
-
IORING_REGISTER_BUFFER_RING_INC_SUPPORTED
private static final boolean IORING_REGISTER_BUFFER_RING_INC_SUPPORTED
-
IORING_ENTER_NO_IOWAIT_SUPPORTED
private static final boolean IORING_ENTER_NO_IOWAIT_SUPPORTED
-
IORING_ACCEPT_MULTISHOT_ENABLED
private static final boolean IORING_ACCEPT_MULTISHOT_ENABLED
-
IORING_RECV_MULTISHOT_ENABLED
private static final boolean IORING_RECV_MULTISHOT_ENABLED
-
IORING_RECVSEND_BUNDLE_ENABLED
private static final boolean IORING_RECVSEND_BUNDLE_ENABLED
-
IORING_POLL_ADD_MULTISHOT_ENABLED
private static final boolean IORING_POLL_ADD_MULTISHOT_ENABLED
-
IORING_ENTER_NO_IOWAIT_ENABLED
private static final boolean IORING_ENTER_NO_IOWAIT_ENABLED
-
NUM_ELEMENTS_IOVEC
static final int NUM_ELEMENTS_IOVEC
-
DEFAULT_RING_SIZE
static final int DEFAULT_RING_SIZE
-
DEFAULT_CQ_SIZE
static final int DEFAULT_CQ_SIZE
-
DEFAULT_PENDING_OPS_INITIAL_CAPACITY
static final int DEFAULT_PENDING_OPS_INITIAL_CAPACITY
-
DISABLE_SETUP_CQ_SIZE
static final int DISABLE_SETUP_CQ_SIZE
- See Also:
- Constant Field Values
-
logger
private static final InternalLogger logger
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
-
isTcpFastOpenClientSideAvailable
public static boolean isTcpFastOpenClientSideAvailable()
Returnstrueif the io_uring native transport is both available and supports client-side TCP FastOpen.- Returns:
trueif it's possible to use client-side TCP FastOpen via io_uring, otherwisefalse.
-
isTcpFastOpenServerSideAvailable
public static boolean isTcpFastOpenServerSideAvailable()
Returnstrueif the io_uring native transport is both available and supports server-side TCP FastOpen.- Returns:
trueif it's possible to use server-side TCP FastOpen via io_uring, otherwisefalse.
-
isCqeFSockNonEmptySupported
static boolean isCqeFSockNonEmptySupported()
-
isUnixDomainSocketInqSupported
static boolean isUnixDomainSocketInqSupported()
-
isSpliceSupported
public static boolean isSpliceSupported()
Returns if SPLICE is supported or not.- Returns:
trueif supported,falseotherwise.
-
isSendZcSupported
static boolean isSendZcSupported()
Returns ifIORING_OP_SEND_ZCis supported.- Returns:
trueifIORING_OP_SEND_ZCis supported,falseotherwise.
-
isSendmsgZcSupported
static boolean isSendmsgZcSupported()
Returns ifIORING_OP_SENDMSG_ZCis supported.- Returns:
trueifIORING_OP_SENDMSG_ZCis supported,falseotherwise.
-
isAcceptNoWaitSupported
static boolean isAcceptNoWaitSupported()
-
isAcceptMultishotSupported
static boolean isAcceptMultishotSupported()
-
isRecvMultishotSupported
static boolean isRecvMultishotSupported()
-
isRecvsendBundleSupported
static boolean isRecvsendBundleSupported()
-
isPollAddMultishotSupported
static boolean isPollAddMultishotSupported()
-
isRegisterIowqMaxWorkersSupported
static boolean isRegisterIowqMaxWorkersSupported()
-
isSetupCqeSizeSupported
static boolean isSetupCqeSizeSupported()
-
isSetupSubmitAllSupported
static boolean isSetupSubmitAllSupported()
-
isSetupCqeMixedSupported
static boolean isSetupCqeMixedSupported()
-
isSetupSingleIssuerSupported
static boolean isSetupSingleIssuerSupported()
-
isSetupDeferTaskrunSupported
static boolean isSetupDeferTaskrunSupported()
-
isIoringSetupNoSqarraySupported
static boolean isIoringSetupNoSqarraySupported()
-
isRegisterBufferRingSupported
public static boolean isRegisterBufferRingSupported()
Returns if it is supported to use a buffer ring.- Returns:
trueif supported,falseotherwise.
-
isRegisterBufferRingIncSupported
public static boolean isRegisterBufferRingIncSupported()
Returns if it is supported to use an incremental buffer ring.- Returns:
trueif supported,falseotherwise.
-
isIoringEnterNoIoWaitSupported
static boolean isIoringEnterNoIoWaitSupported()
-
isIoringEnterNoIoWaitEnabled
public static boolean isIoringEnterNoIoWaitEnabled()
Returns ifIORING_ENTER_NO_IOWAITis used or not. When enabled (and supported by the kernel), idle io_uring_enter(2) waits are not accounted as iowait, which makes server-side CPU metrics more accurate but also suppresses the cpufreq governor's iowait boost.- Returns:
trueif enabled,falseotherwise.
-
isAcceptMultishotEnabled
public static boolean isAcceptMultishotEnabled()
Returns if multi-shot ACCEPT is used or not.- Returns:
trueif enabled,falseotherwise.
-
isRecvMultishotEnabled
public static boolean isRecvMultishotEnabled()
Returns if multi-shot RECV is used or not.- Returns:
trueif enabled,falseotherwise.
-
isRecvsendBundleEnabled
public static boolean isRecvsendBundleEnabled()
Returns if RECVSEND bundles are used or not.- Returns:
trueif enabled,falseotherwise.
-
isPollAddMultishotEnabled
public static boolean isPollAddMultishotEnabled()
Returns if multi-shot POLL_ADD is used or not.- Returns:
trueif enabled,falseotherwise.
-
ensureAvailability
public static void ensureAvailability()
-
memoryAddress
static long memoryAddress(ByteBuf buffer)
-
unavailabilityCause
public static java.lang.Throwable unavailabilityCause()
-
supportedFeatures
private static java.lang.String supportedFeatures()
-
featureString
public static java.lang.String featureString()
Returns a string representation of the io_uring support and feature set. This mirrors the debug logging output that reports each individual feature's availability.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-