kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: Navin P <navinp0304@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: pid start time and new display field in proc pid stat
Date: Thu, 25 Mar 2021 09:20:59 -0600	[thread overview]
Message-ID: <CAJfuBxx9E5SxQ6N7eD+4khVE=0fLPxCM6o0ifNVP0ira8Z9QCQ@mail.gmail.com> (raw)
In-Reply-To: <CALO2Tq+j3LPPvfaBiph4nXmOwQW9kKGMPy7NgkQbLGBDxwEt_Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

On Thu, Mar 25, 2021 at 6:53 AM Navin P <navinp0304@gmail.com> wrote:

> Hi,
>
>  As of 5.11 kernel (pid,pid_start_time) is not unique /monotonic even
> though the underlying counters are .
>  I chose start_boottime because i wanted the counter to increase
> during suspend as well.
>
> 1. Is there any case where task->start_boottime or
> ktime_get_boottime_ns doesn't become monotonic i.e increasing ?
>
> 2.  If start_boottime is not monotonic which counter to use ?
>
> 3.  If i create a new field in task_struct , then i can use a
> atomic_add_return(1,&v) to fill in the task->new_field. Will this also
> work ?
>
>
Its my understanding that task-struct is a highly "contended" resource.

its a basic element, its size matters
everybody wants a bit/byte for something special,
conflicts ensue (or could).
nobody gets them without a real good reason.

I dont know what youre trying to achieve, but i suspect that
youll need to find a more subtle way of doing it.

[-- Attachment #1.2: Type: text/html, Size: 1471 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2021-03-25 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 12:53 Navin P
2021-03-25 15:20 ` jim.cromie [this message]
2021-03-26  3:01   ` Navin P
2021-04-01 14:50     ` pid start time and new display field in proc pid stat [ race in task->start_boottime ,start_time] Navin P
2021-04-03  3:21       ` pid start time and new display field in proc pid stat [ race in task->start_boottime , start_time] Valdis Klētnieks
2021-04-03  8:47         ` pid start time and new display field in proc pid stat [ race in task->start_boottime ,start_time] Navin P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJfuBxx9E5SxQ6N7eD+4khVE=0fLPxCM6o0ifNVP0ira8Z9QCQ@mail.gmail.com' \
    --to=jim.cromie@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=navinp0304@gmail.com \
    --subject='Re: pid start time and new display field in proc pid stat' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).