Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2023 10:00:04 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Emmanuel Vadot <manu@bidouilliste.com>
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:  <CACNAnaHMaZsxfoNkNp6=yb61eUdbyr2jGEUfD342wQG9mBPsaQ@mail.gmail.com>
In-Reply-To: <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com>
References:  <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 5, 2023 at 3:59=E2=80=AFAM Emmanuel Vadot <manu@bidouilliste.co=
m> wrote:
>
>
>  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=3D8935a3993219be76c7ea03e9=
ad4509657d08af6c
> >
> > 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 t=
he
> >       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 ;)
>

Can you check if this is sufficient?
https://people.freebsd.org/~kevans/daemon-kq.diff

We shouldn't bail out if were simply interrupted, presumably we just
want to resume waiting for an event.

Thanks,

Kyle Evans



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