[LTP] [PATCH v4 1/2] lib: add .request_hugepages to reserve hugepage

Li Wang liwang@redhat.com
Sat Feb 22 04:02:26 CET 2020


On Fri, Feb 21, 2020 at 8:16 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li, Cyril,
>
> > > +   if (FILE_LINES_SCANF("/proc/meminfo",
> > > +                           "MemAvailable: %ld", &mem_avail)) {
> > > +           /*
> > > +            * Using "MemFree:" on kernel that doesn't have
> > > +            * "MemAvailable:" in Meminfo
> > > +            */
> > > +           tst_res(TINFO, "MemAvailable: not found in /proc/meminfo");
> > > +
> > > +           mem_avail = SAFE_READ_MEMINFO("MemFree:");
> > > +   }
>
> > I guess that we don't have to bother with MemAvailable here, since we do
> > drop the system caches the MemFree should be equal to MemAvailable. So I
> > would be for reading just MemFree unconditionally here.
>
> > If you agree with this change I can change it before applying.
>
> Merged both patches with this change and my docs change.
>

Thanks very much Petr. Btw, I added a commit to remove the surplus variable
'mem_avail'.(It's a tiny issue so I pushed directly:)

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200222/9598924f/attachment-0001.htm>


More information about the ltp mailing list