tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Is there a current known getrusage() problem (amd64)



    Date:        Thu, 05 Apr 2018 04:08:08 +1000
    From:        matthew green <mrg%eterna.com.au@localhost>
    Message-ID:  <19468.1522865288%splode.eterna.com.au@localhost>

  | this sounds like the timecounter goes backwards issue.

Almost anything is possible, but I doubt it.   This is far
too consistent (that is, it does not just happen sometimes
and I was "lucky" to catch it, it happens every time - for
this process anyway, which is the only one I know that
loops calling getrusage() and not doing any other sys calls.)

The number of iterations before it switches to 0 varies (I
have seen it from the very first call, once) and of course,
before it goes to 0, the actual values vary, but every
time it gives a 0 usage value, and never changes after.

  | aren't there known issues with the tc you mentioned and
  | SMP systems?

Don't know - but one possibility that would fit the symptoms
would be if there are multiple usage counters (one per cpu)
and somehow the values are just coming from one of them,
and it isn't the right one.   Or something like that (sounds
very implausible, I'd expect them to be summed.)

Certainly the way it is being used (on a more or less
standalone system doing nothing else, and wanting
to simply consume CPU until it decides it has had enough)
would fit - usage from all CPUs except "the one" would be
zero, only the one the process is running on would (should)
be different.

kre

ps: I doubt this has anything to do with timekeeping in any
way at all, I suspect a getrusage() specific problem, relating
to collecting the data - not to accumulating it in the first place
(but that's just a gut feeling.)



Home | Main Index | Thread Index | Old Index