[LTP] [PATCH v2] lib: Do not fail a test if oom score cannot be adjusted.
Li Wang
liwang@redhat.com
Thu Dec 23 03:13:29 CET 2021
Hi All,
On Thu, Dec 23, 2021 at 9:17 AM xuyang2018.jy@fujitsu.com
<xuyang2018.jy@fujitsu.com> wrote:
> >> Setting value< 0 in /proc/*/oom_score_adj requires CAP_SYS_RESOURCE or
> >> CAP_SYS_ADMIN.
> Here will mislead user.
> Since the default oom_score_adj value is 0, so we can not set a value < 0.
>
> The value of /proc/<pid>/oom_score_adj may be reduced no lower than the
> last value set by a CAP_SYS_RESOURCE process. To reduce the value any
> lower requires CAP_SYS_RESOURCE.
Good to know this, thank you Xu!
>From the man page, CAP_SYS_RESOURCE gives:
"
CAP_SYS_RESOURCE
...
* set /proc/[pid]/oom_score_adj to a value lower than
the value last set by a process with CAP_SYS_RESOURCE.
"
I will send a V3 base on Petr and Cyril's work to speed up merging this fix.
--
Regards,
Li Wang
More information about the ltp
mailing list