Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2023 15:49:16 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        Jake Freeland <jake@technologyfriends.net>, Alexey Dokuchaev <danfe@freebsd.org>,  Warner Losh <imp@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern
Message-ID:  <CANCZdfp16DBOqQUmQhO4aTYJMR8v%2BUQfZcUTkUk_riry6AP5hA@mail.gmail.com>
In-Reply-To: <92544c55-853c-5ab8-720b-b066e9cad5b0@FreeBSD.org>
References:  <202308242029.37OKTmVs091755@gitrepo.freebsd.org> <ZOyQQgOAap9L7OT1@FreeBSD.org> <CANCZdfqqahUmXxh6sGiPgiGUJCAqiyXjV-x8XT3Nku7007L7fw@mail.gmail.com> <CAOgZAGa7%2BOGmPsAu=OyaMvva2Bw9CLPJLPucvnFMyzXXDr3iag@mail.gmail.com> <92544c55-853c-5ab8-720b-b066e9cad5b0@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000002a3e31060402abb7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 28, 2023 at 3:27=E2=80=AFPM Kyle Evans <kevans@freebsd.org> wro=
te:

> On 8/28/23 16:12, Jake Freeland wrote:
> > On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh <imp@bsdimp.com
> > <mailto:imp@bsdimp.com>> wrote:
> >
> >     Added cc for Jake
> >
> >     On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Dokuchaev <danfe@fre=
ebsd.org
> >     <mailto:danfe@freebsd.org>> wrote:
> >
> >         On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote:
> >          > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34
> >          >
> >          >   timerfd: Move implementation from linux compat to sys/kern
> >          >
> >          >   Move the timerfd impelemntation from linux compat code to
> >         sys/kern.
> >
> >         Could you quickly summarize why we need these linuxish bits in
> >         FreeBSD?
> >         We've lived for years without it.  Had expected to find the
> >         rationale
> >         in DR but alas. :(  Thanks,
> >
> >
> > The amount of software designed exclusively for Linux grows every day.
> > Support for FreeBSD is almost always done on behalf of FreeBSD
> > contributors, not the program developers.
> >
> > I do not want to play the cat-and-mouse game of constantly updating
> > shims so we can support Linux software. I would rather take the
> > sensible* parts of Linux and integrate them into core FreeBSD.
> >
> > My goal is not to turn FreeBSD into Linux, but rather to stay relevant
> > in an age where most younger developers don't even know what BSD is. We
> > should spend more resources on Linux program support, so younger
> > audiences can use their Discord web apps natively on FreeBSD.
> >
> > Absorbing "linuxish" bits is controversial and I think that is a
> > tragedy. In my eyes, having "linuxish" features is one of the best ways
> > to ease the jump between Linux and FreeBSD, and minimize the maintenanc=
e
> > needed for FreeBSD support.
> >
>
> +1. We're not in the game of adopting Linuxisms for the sake of it, but
> rather where they make sense (either they're obviously a good thing, or
> they simply make it easier to write portable scripts/code without
> damaging the quality of our code, like long options).
>
> Remaining different for the sake of remaining different is way more
> silly than adopting sensible features.
>

I agree with both points. In the early days (1.x-4.x) days we were rather
proud we were NOT Linux. However, it set a bad precedent. Most of the
new items that POSIX is standardizing, for example, come from Linux. Much
of the software out there depends on these Linuxisms. In large part, over
the past 5-10 or so years I've noticed the project has generally been more
accepting of including Native version of Linux APIs (command line, system
calls, glibc extentions, etc) to make it easier to just take a random bit
of code off the net and use it. It's pragmatic more than anything else. It'=
s
motivated in large part for high-demand items (like Discord client), but
it has the effect of lowering barriers to entry for people using FreeBSD.

timerfd is one of these things that makes a lot of the 'special case' code
for things that aren't file descriptors less half-baked. In many ways, this
is
very Unixy (old-school everything is a fd). While there are issues with
everything
as a 'fd' at times, there's many times, like event propagation, where the
ability to view anything as a fd is quite powerful. That won't mean the onl=
y
way to do timer things are via a fd (dodging much of the objection to peopl=
e
trying to make everything a fd: it's too artificial). In this case, it
bridges the
domain rather than imposes a dogmatic view that everything has to *BE* a
fd. Just convertible to a FD. timerfd is one of many ways to do this. As
someone
that wrote

This also doesn't interfere with the old FreeBSD ways...

So that's why I went ahead and committed this. It's a de-facto standard tha=
t
things need/want and it's nice to have some of the same tools that Linux
has natively in FreeBSD. Linux stole Unix's system calls in the old days
and created a fork of the Unix way. It's innovated, and it would be silly
to ignore that innovation just because it was in Linux.

And I totally acknowledge there were some issues with the import. I
accept responsibility for not catching them. thankfully, Jake is working
to address them and we have enough time before 14.0. I'm also making
notes for what to do differently next time. One is clearly to loop Alexey
into the process: I didn't think about it before the commit, but in
hindsight
it's really something I should have done.

Warner


> > *
> >
> https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-tec=
hnical-debt/
> <
> https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-tec=
hnical-debt/
> >
> > Jake Freeland
> >
>
> Thanks,
>
> Kyle Evans
>
>

--0000000000002a3e31060402abb7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Aug 28, 2023 at 3:27=E2=80=AF=
PM Kyle Evans &lt;<a href=3D"mailto:kevans@freebsd.org">kevans@freebsd.org<=
/a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">O=
n 8/28/23 16:12, Jake Freeland wrote:<br>
&gt; On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh &lt;<a href=3D"ma=
ilto:imp@bsdimp.com" target=3D"_blank">imp@bsdimp.com</a> <br>
&gt; &lt;mailto:<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">imp@bsd=
imp.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0Added cc for Jake<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Doku=
chaev &lt;<a href=3D"mailto:danfe@freebsd.org" target=3D"_blank">danfe@free=
bsd.org</a><br>
&gt;=C2=A0 =C2=A0 =C2=A0&lt;mailto:<a href=3D"mailto:danfe@freebsd.org" tar=
get=3D"_blank">danfe@freebsd.org</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0On Thu, Aug 24, 2023 at 08:29:48PM +0=
000, Warner Losh wrote:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &gt; commit af93fea710385b2b11f0cabd=
377e7ed6f3d97c34<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &gt;=C2=A0 =C2=A0timerfd: Move imple=
mentation from linux compat to sys/kern<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &gt;=C2=A0 =C2=A0Move the timerfd im=
pelemntation from linux compat code to<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys/kern.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Could you quickly summarize why we ne=
ed these linuxish bits in<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD?<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0We&#39;ve lived for years without it.=
=C2=A0 Had expected to find the<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rationale<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0in DR but alas. :(=C2=A0 Thanks,<br>
&gt; <br>
&gt; <br>
&gt; The amount of software designed exclusively=C2=A0for Linux grows every=
 day. <br>
&gt; Support for FreeBSD is almost always done on behalf of FreeBSD <br>
&gt; contributors, not the program developers.<br>
&gt; <br>
&gt; I do not want to play the cat-and-mouse game of constantly updating <b=
r>
&gt; shims so we can support Linux software. I would rather take the <br>
&gt; sensible* parts of Linux and integrate them into core FreeBSD.<br>
&gt; <br>
&gt; My goal is not to turn FreeBSD into Linux, but rather to stay relevant=
 <br>
&gt; in an age where most younger developers don&#39;t even know what BSD i=
s. We <br>
&gt; should spend more resources on Linux program support, so younger <br>
&gt; audiences can use their Discord web apps natively on FreeBSD.<br>
&gt; <br>
&gt; Absorbing &quot;linuxish&quot; bits is controversial and I think that =
is a <br>
&gt; tragedy. In my eyes, having &quot;linuxish&quot; features is one of th=
e best ways <br>
&gt; to ease the jump between Linux and FreeBSD, and minimize the maintenan=
ce <br>
&gt; needed for FreeBSD support.<br>
&gt; <br>
<br>
+1. We&#39;re not in the game of adopting Linuxisms for the sake of it, but=
 <br>
rather where they make sense (either they&#39;re obviously a good thing, or=
 <br>
they simply make it easier to write portable scripts/code without <br>
damaging the quality of our code, like long options).<br>
<br>
Remaining different for the sake of remaining different is way more <br>
silly than adopting sensible features.<br></blockquote><div><br></div><div>=
I agree with both points. In the early days (1.x-4.x) days we were rather</=
div><div>proud we were NOT Linux. However, it set a bad precedent. Most of =
the</div><div>new items that POSIX is standardizing, for example, come from=
 Linux. Much</div><div>of the software out there depends on these Linuxisms=
. In large part, over</div><div>the past 5-10 or so years I&#39;ve noticed =
the project has generally been more</div><div>accepting=C2=A0of including N=
ative version of Linux APIs (command line, system</div><div>calls, glibc ex=
tentions, etc) to make it easier to just take a random bit</div><div>of cod=
e off the net and use it. It&#39;s pragmatic more than anything else. It&#3=
9;s</div><div>motivated in large part for high-demand items (like Discord c=
lient), but</div><div>it has the effect of lowering barriers to entry for p=
eople using FreeBSD.</div><div><br></div><div>timerfd is one of these thing=
s that makes a lot of the &#39;special case&#39; code</div><div>for things =
that aren&#39;t file descriptors less half-baked. In many ways, this is</di=
v><div>very Unixy (old-school everything is a fd). While there are issues w=
ith everything</div><div>as a &#39;fd&#39; at times, there&#39;s many times=
, like event propagation, where the</div><div>ability to view anything as a=
 fd is quite powerful. That won&#39;t mean the only</div><div>way to do tim=
er things are via a fd (dodging much of the objection to people</div><div>t=
rying to make everything a fd: it&#39;s too artificial). In this case, it b=
ridges the</div><div>domain rather than imposes a dogmatic view that everyt=
hing has to *BE* a</div><div>fd. Just convertible to a FD. timerfd is one o=
f many ways to do this. As someone</div><div>that wrote=C2=A0</div><div><br=
></div><div>This also doesn&#39;t interfere with the old FreeBSD ways...</d=
iv><div><br></div><div>So that&#39;s why I went ahead and committed this. I=
t&#39;s a de-facto standard that</div><div>things need/want and it&#39;s ni=
ce to have some of the same tools that Linux</div><div>has natively in Free=
BSD. Linux stole Unix&#39;s system calls in the old days</div><div>and crea=
ted a fork of the Unix way. It&#39;s innovated, and it would be silly</div>=
<div>to ignore that innovation just because it was in Linux.</div><div><br>=
</div><div>And I totally acknowledge there were some issues with the import=
. I</div><div>accept responsibility for not catching them. thankfully, Jake=
 is working</div><div>to address them and we have enough time before 14.0. =
I&#39;m also making</div><div>notes for what to do differently next time. O=
ne is clearly to loop Alexey</div><div>into the process: I didn&#39;t think=
 about it before the commit, but in hindsight</div><div>it&#39;s really som=
ething I should have done.</div><div><br></div><div>Warner</div><div>=C2=A0=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt; * <br>
&gt; <a href=3D"https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-m=
ountain-of-technical-debt/" rel=3D"noreferrer" target=3D"_blank">https://ar=
iadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-technical-debt/=
</a> &lt;<a href=3D"https://ariadne.space/2021/06/06/actually-bsd-kqueue-is=
-a-mountain-of-technical-debt/" rel=3D"noreferrer" target=3D"_blank">https:=
//ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-technical-d=
ebt/</a>&gt;<br>
&gt; Jake Freeland<br>
&gt; <br>
<br>
Thanks,<br>
<br>
Kyle Evans<br>
<br>
</blockquote></div></div>

--0000000000002a3e31060402abb7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp16DBOqQUmQhO4aTYJMR8v%2BUQfZcUTkUk_riry6AP5hA>