All of lore.kernel.org
 help / color / mirror / Atom feed
* /proc/pid/sched units
@ 2021-07-28 12:56 ` Shivank Garg
  0 siblings, 0 replies; 6+ messages in thread
From: Shivank Garg @ 2021-07-28 12:56 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux MM, util-linux

Hi Everyone,

I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
/proc/$pid/sched) by process in different configurations for my
project work. But I was not able to get the time units for the values
displayed in the file. I tried searching it in source code -
kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
confused.

Can you please answer me about the measurement units (is it
microseconds, nanoseconds, jiffles ...) ?

Also, I was not able to find proper documentation for /proc/pid/sched.
Please point to me if it's already there. If not, I would love to
contribute toward documenting these variables. It would be very
helpful for newbies (like me) in future.

Thanks,
Best Regards,
Shivank Garg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* /proc/pid/sched units
@ 2021-07-28 12:56 ` Shivank Garg
  0 siblings, 0 replies; 6+ messages in thread
From: Shivank Garg @ 2021-07-28 12:56 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux MM, util-linux

Hi Everyone,

I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
/proc/$pid/sched) by process in different configurations for my
project work. But I was not able to get the time units for the values
displayed in the file. I tried searching it in source code -
kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
confused.

Can you please answer me about the measurement units (is it
microseconds, nanoseconds, jiffles ...) ?

Also, I was not able to find proper documentation for /proc/pid/sched.
Please point to me if it's already there. If not, I would love to
contribute toward documenting these variables. It would be very
helpful for newbies (like me) in future.

Thanks,
Best Regards,
Shivank Garg


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Fwd: /proc/pid/sched units
  2021-07-28 12:56 ` Shivank Garg
  (?)
@ 2021-07-28 12:59 ` Shivank Garg
  2021-07-30 21:41   ` Michael Kerrisk (man-pages)
  -1 siblings, 1 reply; 6+ messages in thread
From: Shivank Garg @ 2021-07-28 12:59 UTC (permalink / raw)
  To: linux-doc, linux-man

---------- Forwarded message ---------
From: Shivank Garg <shivankgarg98@gmail.com>
Date: Wed, Jul 28, 2021 at 6:26 PM
Subject: /proc/pid/sched units
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux MM
<linux-mm@kvack.org>, <util-linux@vger.kernel.org>


Hi Everyone,

I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
/proc/$pid/sched) by process in different configurations for my
project work. But I was not able to get the time units for the values
displayed in the file. I tried searching it in source code -
kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
confused.

Can you please answer me about the measurement units (is it
microseconds, nanoseconds, jiffles ...) ?

Also, I was not able to find proper documentation for /proc/pid/sched.
Please point to me if it's already there. If not, I would love to
contribute toward documenting these variables. It would be very
helpful for newbies (like me) in future.

Thanks,
Best Regards,
Shivank Garg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /proc/pid/sched units
  2021-07-28 12:56 ` Shivank Garg
  (?)
  (?)
@ 2021-07-28 13:13 ` Matthew Wilcox
  -1 siblings, 0 replies; 6+ messages in thread
From: Matthew Wilcox @ 2021-07-28 13:13 UTC (permalink / raw)
  To: Shivank Garg; +Cc: Linux Kernel Mailing List, Linux MM, util-linux

On Wed, Jul 28, 2021 at 06:26:44PM +0530, Shivank Garg wrote:
> Hi Everyone,
> 
> I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
> /proc/$pid/sched) by process in different configurations for my
> project work. But I was not able to get the time units for the values
> displayed in the file. I tried searching it in source code -
> kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
> confused.

include/linux/sched/types.h: * @sum_exec_runtime:       total time spent on the CPU, in nanoseconds

why did that leave you more confused?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /proc/pid/sched units
  2021-07-28 12:59 ` Fwd: " Shivank Garg
@ 2021-07-30 21:41   ` Michael Kerrisk (man-pages)
  2021-07-31  3:36     ` Shivank Garg
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-07-30 21:41 UTC (permalink / raw)
  To: Shivank Garg; +Cc: linux-doc, linux-man

Hello Shivank,

On Wed, 28 Jul 2021 at 14:59, Shivank Garg <shivankgarg98@gmail.com> wrote:
>
> ---------- Forwarded message ---------
> From: Shivank Garg <shivankgarg98@gmail.com>
> Date: Wed, Jul 28, 2021 at 6:26 PM
> Subject: /proc/pid/sched units
> To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux MM
> <linux-mm@kvack.org>, <util-linux@vger.kernel.org>
>
>
> Hi Everyone,
>
> I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
> /proc/$pid/sched) by process in different configurations for my
> project work. But I was not able to get the time units for the values
> displayed in the file. I tried searching it in source code -
> kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
> confused.
>
> Can you please answer me about the measurement units (is it
> microseconds, nanoseconds, jiffles ...) ?
>
> Also, I was not able to find proper documentation for /proc/pid/sched.
> Please point to me if it's already there. If not, I would love to
> contribute toward documenting these variables. It would be very
> helpful for newbies (like me) in future.

It looks like se.sum_exec_runtime is milliseconds. In
kernel/sched/debug.c, see proc_sched_show_task(), the definition of
the PN() PNS(), and SPLIT_NS() macros, and the nsec_high(x) and
nsec_low(x) functions.

Thanks,

Michael


--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /proc/pid/sched units
  2021-07-30 21:41   ` Michael Kerrisk (man-pages)
@ 2021-07-31  3:36     ` Shivank Garg
  0 siblings, 0 replies; 6+ messages in thread
From: Shivank Garg @ 2021-07-31  3:36 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-doc, linux-man, willy

Hi,

Thanks for the help. My confusion is clear now.

On Sat, Jul 31, 2021 at 3:11 AM Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
>
> Hello Shivank,
>
> On Wed, 28 Jul 2021 at 14:59, Shivank Garg <shivankgarg98@gmail.com> wrote:
> >
> > ---------- Forwarded message ---------
> > From: Shivank Garg <shivankgarg98@gmail.com>
> > Date: Wed, Jul 28, 2021 at 6:26 PM
> > Subject: /proc/pid/sched units
> > To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux MM
> > <linux-mm@kvack.org>, <util-linux@vger.kernel.org>
> >
> >
> > Hi Everyone,
> >
> > I'm analyzing the cpu time taken ("se.sum_exec_runtime" in
> > /proc/$pid/sched) by process in different configurations for my
> > project work. But I was not able to get the time units for the values
> > displayed in the file. I tried searching it in source code -
> > kernel/sched/cputime.c,include/linux/sched.h etc. but it left me more
> > confused.
> >
> > Can you please answer me about the measurement units (is it
> > microseconds, nanoseconds, jiffles ...) ?
> >
> > Also, I was not able to find proper documentation for /proc/pid/sched.
> > Please point to me if it's already there. If not, I would love to
> > contribute toward documenting these variables. It would be very
> > helpful for newbies (like me) in future.
>
> It looks like se.sum_exec_runtime is milliseconds. In
> kernel/sched/debug.c, see proc_sched_show_task(), the definition of
> the PN() PNS(), and SPLIT_NS() macros, and the nsec_high(x) and
> nsec_low(x) functions.
>
> Thanks,
>
> Michael
>
>
> --
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-31  3:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 12:56 /proc/pid/sched units Shivank Garg
2021-07-28 12:56 ` Shivank Garg
2021-07-28 12:59 ` Fwd: " Shivank Garg
2021-07-30 21:41   ` Michael Kerrisk (man-pages)
2021-07-31  3:36     ` Shivank Garg
2021-07-28 13:13 ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.