From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: getpriority() and top display for priority inconsistent
Date: Thu, 08 Aug 2019 15:40:00 -0000 [thread overview]
Message-ID: <20190808154032.GL11632@calimero.vinschen.de> (raw)
In-Reply-To: <BL0PR0901MB4308CB6DF70A4BE5D41489AEA5D70@BL0PR0901MB4308.namprd09.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
On Aug 8 13:45, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> > 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?
Feel free to provide a patch, just, please, create a valid git commit
message and send the stuff to cygwin-patches (unless the patch is
really trivial).
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-08-08 15:40 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
2019-08-08 15:40 ` Corinna Vinschen [this message]
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=20190808154032.GL11632@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/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).