On Mon, Sep 11, 2023 at 12:01 PM Benjamin Stürz <benni+open...@stuerz.xyz>
wrote:

> I'm writing a little toy /proc fuse-fs for OpenBSD.
>
> The field p_schedflags defined in struct kinfo_proc
> in file /usr/include/sys/sysctl.h refers to PSCHED_*,
> but I can't find any references to these macros with:
> $ grep -rn PSCHED_ /usr/include /usr/src/sys
>
> Nor can I find any references to p_schedflags:
> $ grep -rn p_schedflags /usr/src
>
> This leads me to believe that this field is unused
> and should also be marked accordingly,
> to avoid future confusion.
>
> If not, please let me know how I interpret use this field.
>

Yeah, that field hasn't actually been set since 2007, when the scheduler
state was moved into per-CPU struct schedstate_percpu.  I guess it should
be deleted the next time we bump the kinfo_proc ABI, along with a review of
whether there are other dead items.

I don't think we're, at least at this time, interested in exposing or
making any promises about the inner workings of the scheduler, as those
flags did.


Philip

Reply via email to