Class IoUring

java.lang.Object
io.netty.channel.uring.IoUring

public final class IoUring extends Object
  • Field Details

    • UNAVAILABILITY_CAUSE

      private static final 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:
    • logger

      private static final InternalLogger logger
  • Constructor Details

    • IoUring

      private IoUring()
  • Method Details

    • isAvailable

      public static boolean isAvailable()
    • isTcpFastOpenClientSideAvailable

      public static boolean isTcpFastOpenClientSideAvailable()
      Returns true if the io_uring native transport is both available and supports client-side TCP FastOpen.
      Returns:
      true if it's possible to use client-side TCP FastOpen via io_uring, otherwise false.
    • isTcpFastOpenServerSideAvailable

      public static boolean isTcpFastOpenServerSideAvailable()
      Returns true if the io_uring native transport is both available and supports server-side TCP FastOpen.
      Returns:
      true if it's possible to use server-side TCP FastOpen via io_uring, otherwise false.
    • isCqeFSockNonEmptySupported

      static boolean isCqeFSockNonEmptySupported()
    • isUnixDomainSocketInqSupported

      static boolean isUnixDomainSocketInqSupported()
    • isSpliceSupported

      public static boolean isSpliceSupported()
      Returns if SPLICE is supported or not.
      Returns:
      true if supported, false otherwise.
    • isSendZcSupported

      static boolean isSendZcSupported()
      Returns if IORING_OP_SEND_ZC is supported.
      Returns:
      true if IORING_OP_SEND_ZC is supported, false otherwise.
    • isSendmsgZcSupported

      static boolean isSendmsgZcSupported()
      Returns if IORING_OP_SENDMSG_ZC is supported.
      Returns:
      true if IORING_OP_SENDMSG_ZC is supported, false otherwise.
    • 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:
      true if supported, false otherwise.
    • isRegisterBufferRingIncSupported

      public static boolean isRegisterBufferRingIncSupported()
      Returns if it is supported to use an incremental buffer ring.
      Returns:
      true if supported, false otherwise.
    • isIoringEnterNoIoWaitSupported

      static boolean isIoringEnterNoIoWaitSupported()
    • isIoringEnterNoIoWaitEnabled

      public static boolean isIoringEnterNoIoWaitEnabled()
      Returns if IORING_ENTER_NO_IOWAIT is 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:
      true if enabled, false otherwise.
    • isAcceptMultishotEnabled

      public static boolean isAcceptMultishotEnabled()
      Returns if multi-shot ACCEPT is used or not.
      Returns:
      true if enabled, false otherwise.
    • isRecvMultishotEnabled

      public static boolean isRecvMultishotEnabled()
      Returns if multi-shot RECV is used or not.
      Returns:
      true if enabled, false otherwise.
    • isRecvsendBundleEnabled

      public static boolean isRecvsendBundleEnabled()
      Returns if RECVSEND bundles are used or not.
      Returns:
      true if enabled, false otherwise.
    • isPollAddMultishotEnabled

      public static boolean isPollAddMultishotEnabled()
      Returns if multi-shot POLL_ADD is used or not.
      Returns:
      true if enabled, false otherwise.
    • ensureAvailability

      public static void ensureAvailability()
    • memoryAddress

      static long memoryAddress(ByteBuf buffer)
    • unavailabilityCause

      public static Throwable unavailabilityCause()
    • supportedFeatures

      private static String supportedFeatures()
    • featureString

      public static 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 String toString()
      Overrides:
      toString in class Object