<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">On 27/02/2026 06:04, Mengyang Li wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAJ_HiMvWzrQm75+oYmOzdg1L7j6s1DAw1CtPkMs5fEsH032Spg@mail.gmail.com">
      
      <div dir="ltr">
        <p class="gmail-p1">Hi Alan,</p>
        <p class="gmail-p1">Thanks for the quick reply. I’ll continue
          investigating the custom scheduler and <span class="gmail-s1">sun.nio.ch.Poller</span>
          related code.</p>
        <p class="gmail-p1">I also checked the Loom repo’s <span class="gmail-s1">io_uring</span> branch and noticed a
          difference when io_uring poller is enabled:</p>
        <p class="gmail-p3"><span class="gmail-s2"></span></p>
        <ul>
          <li>
            <p class="gmail-p1">SocketChannelImpl<span class="gmail-s1">
                still does </span>park(Net.POLLIN)<span class="gmail-s1"> then </span>IOUtil.read(...)</p>
          </li>
          <li>
            <p class="gmail-p1"><span class="gmail-s1">NioSocketImpl</span>
              (for virtual threads) does:</p>
          </li>
        </ul>
        <div>``` java</div>
        <div>if (Poller.supportReadOps() &&
          Thread.currentThread().isVirtual()) {<br>
              n = Poller.read(fdVal(fd), b, off, len, remainingNanos,
          this::isOpen);<br>
              if (n != IOStatus.UNAVAILABLE) return n;<br>
          }</div>
        <div>```</div>
        <div>
          <p class="gmail-p1">Why isn’t <span class="gmail-s1">SocketChannelImpl</span>
            using a similar <span class="gmail-s1">Poller.read(...)</span>
            VT path? Is this intentional, or just not wired up yet in
            that branch?<br>
          </p>
        </div>
      </div>
    </blockquote>
    This is a lot of work required on memory management before the
    read/write ops can efficiently make use of this. This is why the
    comment in the NioSocketImpl code says "experimental".<br>
    <br>
    -Alan<br>
  </body>
</html>