Date: Fri, 31 Mar 2023 09:28:53 +0200 From: Alexander Leidinger <Alexander@leidinger.net> To: Mateusz Guzik <mjguzik@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Periodic rant about SCHED_ULE Message-ID: <20230331092853.Horde.OjdeEhUbQnY_fAcTedXJHY5@webmail.leidinger.net> In-Reply-To: <CAGudoHGzBjXjXZFs%2BqZJUS-M6VeX5=LB2ifRLP7hFBZXPvqP7g@mail.gmail.com> References: <a401e51a-250a-64a0-15cb-ff79bcefbf94@m5p.com> <8173cc7e-e934-dd5c-312a-1dfa886941aa@FreeBSD.org> <8cfdb951-9b1f-ecd3-2291-7a528e1b042c@m5p.com> <c3f5f667-ba0b-c40c-b8a6-19d1c9c63c5f@FreeBSD.org> <ZBtRJhNHluj5Nzyk@troutmask.apl.washington.edu> <CAGudoHEj%2BkoaYhkjzDE5KX9OsCno=X5M_E3z9uwg6Pg7dtqTsA@mail.gmail.com> <CAGudoHHxTT-Cn11zcFB3ZwF76UcRUv=QS28RLgzd=hVehTy0Kg@mail.gmail.com> <CAGudoHGoh30O-3O0jjwevDvP43-ykUt6JUDiwRNW918VZfybhA@mail.gmail.com> <CAGudoHEWfy61XSMhXdYOrKWVotuC0Kc6NSWiaaZCy6aQhbvXoQ@mail.gmail.com> <CAGudoHFPqz_LtsVNnz4P2gyKXz5Z8hU%2Bv6QYGizm4%2BDtZRn8Yg@mail.gmail.com> <CAGudoHGzBjXjXZFs%2BqZJUS-M6VeX5=LB2ifRLP7hFBZXPvqP7g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format and has been PGP signed. --=_l8AL_ieHTE-W7Y1C0XG6ITV Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Mateusz Guzik <mjguzik@gmail.com> (from Thu, 30 Mar 2023=20=20 17:36:54=20+0200): > Right now I'm toying with the idea of either: > 1. having programs explicitly tell the kernel they are interactive There is no POSIX interface to do this. I'm not aware of a widespread=20=20 use=20of private interfaces in other unix-like operating systems to do=20= =20 this. I=20consider modifying all interactive programs with FreeBSD specific=20=20 code=20to do so a bad idea. I consider modifying the X server with FreeBSD specific code to do so=20=20 on=20behalf of programs using it a bad idea too (what about interactive=20= =20 non-X-using=20programs I start in an xterm or from the vidconsole?). > 2. adding a scheduler hook to /dev/dsp -- the observation is that if a > program is producing sound it probably should get some cpu time in a > timely manner. this would cover audio/video players and web browsers, > but would not cover other programs (say a pdf reader). it may be it is > good enough though What if I don't have an audio device on a system but run interactive=20=20 programs=20on it? You told it yourself, it favourites a specific class=20= =20 of=20programs. Please think this to the end, you are telling you only=20=20 want=20to priorize a subset of interactive processes and leave others=20=20 alone.=20If you are honest to yourself, you need to say this is a hack,=20= =20 not=20a solution. My suggestion is to first fix the bugs we/you are able to fix (number=20=20 2),=20and then to measure again with a bigger sample size. Small=20=20 evolution=20and re-observation instead of a big bang fix of everything=20= =20 based=20upon assumptions of what impact the smaller fixes may have on=20=20 our=20big population of use cases. Maybe someone has an idea how to factor out lock contention in the=20=20 mean=20time, and we can have a look if this improves something for=20=20 someone=20by providing it as a fix (no matter if gated by a sysctl or=20=20 not)=20and we can re-measure again. Bye, Alexander. --=20 http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_l8AL_ieHTE-W7Y1C0XG6ITV Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIzBAABCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmQmi7QACgkQEg2wmwP4 2IZ3Yg/9FeOTevrIe8RaVX0s7/+su23CYPjpUhag2atYsQlpqfN8nAxWtr6rKFY3 OEf0taMPygCtCZI66R46gI7HeUNL0E+4ZS9qqZglqvB2vet/zweXht7eQqvW1cAD PglU86lt/CBLgHbL0MLoebc7gjwE8xbcPob+fxOz+8iPTzbCbFabwz005as76ZD8 bokH2TKSm6bKu3Y6y5kqmoTAYJ63UheEGxZ6+GPDWdkxhTvImLD/paQ5pZh4kYvo 2zqDW872ATCvmtNEpEibrXSk07vavWAWVCuLIkBCLOpCsBgAuHGG3UWmjAjOLJiM bNTbqLwuLWY+K/QJ4lh7QIxLfdC8aP/ndoIh3Bw5FF+Q+4Eq+4ki7Q4hdmySTCgJ 11iJAB6i+WXmJfBGNCMLQF0VHyWh3QrVmetfmTEVZzLYSyMESrBgo1tBCcv3BgZc WIhMTMI8v+1OPUahrs63d6mZPIAlC4ZNxqrfmzjyEySGMDApp2tVu6kLDVEItSrW aqVLcQOT/aocvu4xAWnPr0bWyFhsu9oidpgaWgb026/juUBHHAX5Dn6ji5n9uZBR Zqh108VeryLz97aN+ar+Fq7a7xy/gylSo8HikPXpSI4c55964PXVnfajDi4paDAb 8AvF4uHlwqv+/a16JDo5cdUTbMsRkfhEAEuMtIVdPAp1O8jM+mI= =0XFB -----END PGP SIGNATURE----- --=_l8AL_ieHTE-W7Y1C0XG6ITV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230331092853.Horde.OjdeEhUbQnY_fAcTedXJHY5>