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

Petr Vorel pvorel@suse.cz
Fri Feb 21 13:16:18 CET 2020


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.

Kind regards,
Petr


More information about the ltp mailing list