Date: Fri, 05 Jun 2020 03:44:07 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 246940] [wishlist/enhancement, patch incl.]: idle user tasks should be charged as "nice" or "idle" CPU time Message-ID: <bug-246940-227-5Ysj0Ztl41@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-246940-227@https.bugs.freebsd.org/bugzilla/> References: <bug-246940-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246940 t.eichstaedt@gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #215172|0 |1 is obsolete| | Attachment #215173|0 |1 is obsolete| | --- Comment #8 from t.eichstaedt@gmx.net --- Created attachment 215241 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D215241&action= =3Dedit expose add. cp_time(s) (realtime/idle) via sysctl cp_time(s)_ext Now guess what, that was so simple that it succeeded to compile on the 3rd = try (only typos), and it runs on bare metal on the 1st -- I'm writing this with= the patch applied. I was too lazy to beadm or set up a VM to test. If I violated any written or unspoken guidelines/rules, please let me know (PLMK). The Dev Handbook is on top of my list to read, but for now I just followed = what I saw in the src code. I took the freedom to add some comments and documentation which might write= out what is already clear to the avg audience. If so, PLMK, and I'll fix all t= hat. I want to do it the BSD way, and no quick hack. In pcpu.h:struct pcpu{}, I added "long pc_cp_time_ext[CPUSTATES_EXT]" analo= gue to "pc_cp_time[CPUSTATES]", and I'm not comfortable with that. It will bre= ak some base and port apps, right? top(1) runs... but others? Strictly speaking, a new sysctl is not neccessary, as I also added resource.h:read_cpu_time_ext() analogue to read_cpu_time(). IMHO it's kind= to have a sysctl, because curious folk who will make use out of it, will stumb= le over this more likely than if it's hidden in a header file. Now if you approve this patch, I can start patching powerd(8) to make use of it, but I fear to start an avalanche, esp. concerning supporting freq setti= ng on independant cpu. It also seems fairly simple, though. thx again for your time. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246940-227-5Ysj0Ztl41>