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
[-- Attachment #1 --] Quoting Mateusz Guzik <mjguzik@gmail.com> (from Thu, 30 Mar 2023 17:36:54 +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 use of private interfaces in other unix-like operating systems to do this. I consider modifying all interactive programs with FreeBSD specific code to do so a bad idea. I consider modifying the X server with FreeBSD specific code to do so on behalf of programs using it a bad idea too (what about interactive non-X-using programs 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 programs on it? You told it yourself, it favourites a specific class of programs. Please think this to the end, you are telling you only want to priorize a subset of interactive processes and leave others alone. If you are honest to yourself, you need to say this is a hack, not a solution. My suggestion is to first fix the bugs we/you are able to fix (number 2), and then to measure again with a bigger sample size. Small evolution and re-observation instead of a big bang fix of everything based upon assumptions of what impact the smaller fixes may have on our big population of use cases. Maybe someone has an idea how to factor out lock contention in the mean time, and we can have a look if this improves something for someone by providing it as a fix (no matter if gated by a sysctl or not) and we can re-measure again. Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230331092853.Horde.OjdeEhUbQnY_fAcTedXJHY5>
