Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I'm developing a process management application, and for particular reasons I'm looking into /proc/sched_debug at the moment. Unfortunately, I can't find documentation about this file anywhere, so I have a couple of questions if anyone can help:
Does .curr->pid under a CPU indicate a process that was physically executing WHEN sched_debug was read, or simply the last process to be scheduled on that CPU?
If the .curr->pid field is 0 for a CPU, what exactly does this indicate? Does this simply mean no process is currently scheduled?
Thanks for your time, I hope to receive some useful insight.
I doubt that you can get that degree of useful-detail from such a source ... and here is why: whatever results you get will be those of "that particular instant," not plus-or-minus one microsecond later. Perhaps you could tell us more about what your "process management application" needs to do, and to report? Tell us all where you're coming from and where you need to go.
I doubt that you can get that degree of useful-detail from such a source ... and here is why: whatever results you get will be those of "that particular instant," not plus-or-minus one microsecond later. Perhaps you could tell us more about what your "process management application" needs to do, and to report? Tell us all where you're coming from and where you need to go.
I'm aware of that. One thing I'm trying to do at the moment is display a time line of PIDs that are physically executing on the CPUs across a period of time. I know that ideally I would need to monitor this from the kernel, but it seems as though that can't realistically be done without significant overhead.
I'm looking into this file as a possible simpler solution. If I could instead read this file at short intervals (1 second?), and read from it which PIDs were physically executing at the particular instant the file is generated, that should suffice. I just can't find information as to exactly what the relevant contents of the file indicate.
I had a look at this some time back - just looking for some light reading whilst watching some footy on television ....
Basically you'll have to trawl through lkml, and after that you'll discover the attitude seems to be - "read the source". There is damn-all doco on it, and Ingo doesn't seem the least bit interested in changing the situation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.