[LTP] [PATCH v3 1/3] lib: add functions to adjust oom score

Petr Vorel pvorel@suse.cz
Tue Dec 21 11:44:28 CET 2021


> Hi!
> > So, I will push (the improved) code like below, after getting
> > Petr and you ack again:

> > +static void set_oom_score_adj(pid_t pid, int value)
> > +{
> > +       int val;
> > +       char score_path[64];
> > +
> > +       if (access("/proc/self/oom_score_adj", F_OK) == -1) {
> > +               tst_res(TINFO, "Warning: oom_score_adj does not exist,
> > +                               skipping the adjustement");

> I'm not sure about the "Warning:" in this message, I would just dully
> informed the user that the interface is not available.

I'd also prefer not having to print "Warning:" in TINFO message
(I know TWARN exit non-zero).

Kind regards,
Petr



More information about the ltp mailing list