Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2023 17:07:54 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        ihor@antonovs.family, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 8935a3993219 - main - daemon: use kqueue for all events
Message-ID:  <20230505170754.01f9e99fbc90e7afede80ae9@bidouilliste.com>
In-Reply-To: <CACNAnaHMaZsxfoNkNp6=yb61eUdbyr2jGEUfD342wQG9mBPsaQ@mail.gmail.com>
References:  <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> <CACNAnaHMaZsxfoNkNp6=yb61eUdbyr2jGEUfD342wQG9mBPsaQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 May 2023 10:00:04 -0500
Kyle Evans <kevans@freebsd.org> wrote:

> On Fri, May 5, 2023 at 3:59?AM Emmanuel Vadot <manu@bidouilliste.com> wro=
te:
> >
> >
> >  Hello,
> >
> > On Fri, 14 Apr 2023 05:13:54 GMT
> > Kyle Evans <kevans@FreeBSD.org> wrote:
> >
> > > The branch main has been updated by kevans:
> > >
> > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8935a3993219be76c7ea03=
e9ad4509657d08af6c
> > >
> > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c
> > > Author:     Ihor Antonov <ihor@antonovs.family>
> > > AuthorDate: 2023-04-14 05:10:29 +0000
> > > Commit:     Kyle Evans <kevans@FreeBSD.org>
> > > CommitDate: 2023-04-14 05:12:21 +0000
> > >
> > >     daemon: use kqueue for all events
> > >
> > >     Refactor daemon to use kqueue/kevent instead of signals.
> > >
> > >     This changes allows to simplify the code in several ways:
> > >     - the execution flow is now linear, no async events.
> > >     - several variables became redundant and got removed.
> > >     - all event handling is now concentrated inside of the event loop=
, which
> > >       makes code reading and comprehension easier.
> > >     - new kqueuex(2) call is used for CLOEXEC, but maintained closing=
 the
> > >       kq fd prior to execve() to ease later MFC
> > >
> > >     No UX/API changes are intended.
> > >
> > >     Reviewed by:    kevans
> > >     Pull Request:   https://github.com/freebsd/freebsd-src/pull/701
> >
> >  This break sysutils/seatd when we resume and leaves the console is a
> > really sad state (impossible to use, keystroke don't match).
> >  Don't really know how to properly debug but :
> >
> >  1/ Reverting the commit make seatd not exiting on resume (and so sway
> > doesn't exit).
> >  2/ If I start seatd without daemon it works
> >  3/ If I manually start saetd with daemon in tmux with
> >  "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd
> > -g video" (so same thing as the rc script) I see
> >  "daemon: kevent wait: Interrupted system call" printed when I get back
> > network.
> >
> >  Feel free to ask me any test you want to debug further ;)
> >
>=20
> Can you check if this is sufficient?
> https://people.freebsd.org/~kevans/daemon-kq.diff
>=20
> We shouldn't bail out if were simply interrupted, presumably we just
> want to resume waiting for an event.
>=20
> Thanks,
>=20
> Kyle Evans

 Seems to work fine, thanks !

--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230505170754.01f9e99fbc90e7afede80ae9>