From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/getpriority01: exclude default priority check for PRIO_USER.
Date: Thu, 24 Nov 2016 15:02:29 +0800 [thread overview]
Message-ID: <58369085.1000109@cn.fujitsu.com> (raw)
In-Reply-To: <20161123150439.GM3346@rei.lan>
Hi!
On 11/23/2016 11:04 PM, Cyril Hrubis wrote:
> Hi!
>>>> It happens on Fedora20, RHEL5.11GA, RHEL6.8GA, RNEL7.3GA, testing returns
>>>> -20 and -11 for PRIO_USER as root and nobody respectively.
>>>
>>> Hmm, are you sure that this is not a bug? Since -20 is the highest
>>> priority for a process, it does not make much sense to run all root
>>> processes like that.
>>
>> Yes, not all root processes are -20 on my system, but sorry, I am afraid
>> it's not a bug, because man page says that the getpriority() call returns
>> the highest priority (lowest numerical value) enjoyed by any of the
>> specified processes, so if only there is one process is -20, the getpriority()
>> will return -20.
>
> Ah, my bad, sure we can't really say if there is a process that belongs
> to the same user with priority lower than 0.
>
> So what about we define a range in which the return value should be and
> set it to 0 .. 0 for PRIO_PROCESS and PRIO_PGRP and to -20 .. 0 for
> PRIO_USER?
Sounds good, I will rewrite the patch, thanks.
Best Regards,
Guangwen Feng
prev parent reply other threads:[~2016-11-24 7:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 6:02 [LTP] [PATCH] syscalls/getpriority01: exclude default priority check for PRIO_USER Guangwen Feng
2016-11-22 8:56 ` Cyril Hrubis
2016-11-22 9:34 ` Guangwen Feng
2016-11-22 9:37 ` Cyril Hrubis
2016-11-23 6:26 ` Guangwen Feng
2016-11-23 15:04 ` Cyril Hrubis
2016-11-24 7:02 ` Guangwen Feng [this message]
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=58369085.1000109@cn.fujitsu.com \
--to=fenggw-fnst@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/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 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.