public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" <cygwin@cygwin.com>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Re: getpriority() and top display for priority inconsistent
Date: Thu, 08 Aug 2019 13:46:00 -0000	[thread overview]
Message-ID: <BL0PR0901MB4308CB6DF70A4BE5D41489AEA5D70@BL0PR0901MB4308.namprd09.prod.outlook.com> (raw)

> I pushed your patch with a short commit message.

Thanks!  Thinking about that a little more, getpriority(PRIO_PROCESS) returns the cached version of priority (since the last
setpriority()) but should return "live" version by re-getting and re-caching the actual thing from the system:
1. The priority could have been changed from the outside (it is a windows process, after all, and anybody can use Task Manager, for example);
2. When pulling group or user priorities from getpriority(), those things get returned from fresh "winpids", which gets constructed
   on-the-fly and so "nice" gets populated from the system; so the results can be, again, inconsistent (e.g. if compared to getpriority() for
   the process alone, since it is a cached one);
3. "/proc/PID/stat" always shows the live results (even before my change, although it was showing the "wrong" value).

Thoughts?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2019-08-08 13:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 13:46 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin [this message]
2019-08-08 15:40 ` Corinna Vinschen
2019-08-14 20:01 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  7:29 ` Corinna Vinschen
2019-08-15  9:41   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15 10:20     ` Corinna Vinschen
2019-08-15 10:23       ` Corinna Vinschen
2019-08-15 11:04       ` Houder
2019-08-15 11:13         ` john doe
2019-08-15 10:54     ` john doe

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=BL0PR0901MB4308CB6DF70A4BE5D41489AEA5D70@BL0PR0901MB4308.namprd09.prod.outlook.com \
    --to=cygwin@cygwin.com \
    --cc=lavr@ncbi.nlm.nih.gov \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).