[LTP] [PATCH] lib: memutils: don't pollute entire system memory to avoid OoM
Martin Doucha
mdoucha@suse.cz
Wed Sep 8 15:54:31 CEST 2021
On 08. 09. 21 15:37, Cyril Hrubis wrote:
> Hi!
> I guess that this is another bug that should be fixed before the
> release. I still think that the memory pollution is a best effort
> operation and that we should be more conservative with the reserve. I
> would go for a few percents of the free memory just to be extra sure
> that we do not cause memory pressure.
>
> If we go for 2% we will add following;
>
> safety = MAX(safety, info.freeram / 50);
>
> Also it looks like info.freeram is the same as MemFree: from
> /proc/meminfo, I guess that this is not wrong, since memory that have
> been used in buffers is dirty enough for our case.
I'd recommend dividing by a power of 2 (either 32 or 64) but other than
that, I completely agree.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list