@@ -547,8 +547,10 @@ pub struct ProactorBuilder {
547547 sqpoll_idle : Option < Duration > ,
548548 sqpoll_cpu : Option < u32 > ,
549549 cqsize : Option < u32 > ,
550+ single_issuer : bool ,
550551 coop_taskrun : bool ,
551552 taskrun_flag : bool ,
553+ defer_taskrun : bool ,
552554 eventfd : Option < RawFd > ,
553555 driver_type : Option < DriverType > ,
554556 op_flags : OpCodeFlag ,
@@ -577,8 +579,10 @@ impl ProactorBuilder {
577579 sqpoll_idle : None ,
578580 sqpoll_cpu : None ,
579581 cqsize : None ,
582+ single_issuer : false ,
580583 coop_taskrun : false ,
581584 taskrun_flag : false ,
585+ defer_taskrun : false ,
582586 eventfd : None ,
583587 driver_type : None ,
584588 op_flags : OpCodeFlag :: empty ( ) ,
@@ -678,6 +682,17 @@ impl ProactorBuilder {
678682 self
679683 }
680684
685+ /// Set the `io-uring` single issuer hint.
686+ ///
687+ /// # Notes
688+ ///
689+ /// - Available since Linux Kernel 6.0.
690+ /// - Only effective when the `io-uring` feature is enabled
691+ pub fn single_issuer ( & mut self , enable : bool ) -> & mut Self {
692+ self . single_issuer = enable;
693+ self
694+ }
695+
681696 /// Optimize performance for most cases, especially compio is a single
682697 /// thread runtime.
683698 ///
@@ -706,6 +721,22 @@ impl ProactorBuilder {
706721 self
707722 }
708723
724+ /// Defer io-uring task work until the driver enters the kernel to wait for
725+ /// completions.
726+ ///
727+ /// This is only applied when [`single_issuer`](Self::single_issuer) is
728+ /// enabled. The kernel requires `IORING_SETUP_SINGLE_ISSUER` for
729+ /// `IORING_SETUP_DEFER_TASKRUN`.
730+ ///
731+ /// # Notes
732+ ///
733+ /// - Available since Linux Kernel 6.1.
734+ /// - Only effective when the `io-uring` feature is enabled
735+ pub fn defer_taskrun ( & mut self , enable : bool ) -> & mut Self {
736+ self . defer_taskrun = enable;
737+ self
738+ }
739+
709740 /// Register an eventfd to io-uring.
710741 ///
711742 /// # Notes
0 commit comments