On Tue, Sep 05, 2023 at 09:45:44AM -0500, Eric Blake wrote:
> On Mon, Sep 04, 2023 at 06:59:15PM +0000, Tage Johansson wrote:
> > 
> > > > +        // can be both readable and writable, but we survive just fine
> > > > +        // if we only see one direction even when both are available.
> > > > +        poll.registry().register(
> > > > +            &mut SourceFd(&fd),
> > > > +            Token(0),
> > > > +            MioInterest::READABLE | MioInterest::WRITABLE,
> > > > +        )?;
> > > > +        poll.poll(&mut events, Some(Duration::ZERO))?;
> > > Why do we want 'poll.poll()?;', that is, to fail this function if the
> > > poll returns an error?  We _expect_ poll to sometimes return an error
> > > (namely, the fact that it timed out) if there is nothing pending on
> > > the fd, at which point we WANT to successfully clear the ready_guard
> > > for both read and write, rather than to error out of this function.
> > 
> > 
> > You are right. I thought that the poll() call would return Ok(()) upon
> > timeout, but according to the documentation:
> > 
> > > Currently if the timeout elapses without any readiness events triggering
> > > this will return Ok(()). However we’re not guaranteeing this behaviour
> > > as this depends on the OS.
> > 
> > So I guess it is best to ignore any errors from the poll call as in your
> > patch.
> 
> Okay, I'll merge in that aspect of my original along with your other
> improvements, and push something soon.  Fingers crossed that we'll
> finally get a green CI run today.

Now in as 75979812.  Still not a green CI run; but the BSD builds now
work. The only remaining holdout is OpenSUSE Leap 15.5, where OCaml is
stuck at 4.06 and therefore lacks List.to_seq |> Map.of_seq.  I'm not
sure if it is worth trying to copy the 4.07 implementations just so we
can keep the two sorted name maps (one of the reasons you WANT to use
a standard library implementation of Map is that writing a correct
self-balancing binary tree implementation is not trivial).  But do we
need the resulting sets of APIs to be sorted by name?  If we just
stick to constructs in 4.06, we may be hit with slower O(n^2) list
filtering when comparing which APIs go in which of the two lists (sync
vs async), but is our list of APIs so large that it actually makes a
noticeable difference to compile time?

Rich, do you have any more ideas beyond Erik's recommendation [1] of
just dropping OpenSUSE 15.5 and focusing only on Tumbleweed?

[1] https://gitlab.com/nbdkit/libnbd/-/merge_requests/5#note_1535510343

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to