[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9924] Suggestion for a memory() function
From: |
Lars Kindermann |
Subject: |
[Octave-patch-tracker] [patch #9924] Suggestion for a memory() function |
Date: |
Sun, 24 May 2020 06:28:56 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
Follow-up Comment #26, patch #9924 (project octave):
@markus, re comment #22
>> I also added a fallback to MemFree if MemAvailable doesn't exist in
>> proc/meminfo. Is this ok? Or is there something better we can do?
This is from the kernel patch comment that indrocuded the MemAvailable field:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
"Many load balancing and workload placing programs check /proc/meminfo to
estimate how much free memory is available. They generally do this by
adding up "free" and "cached", which was fine ten years ago, but is
pretty much guaranteed to be wrong today."
So I added the "ten year old way" to memory.m as a fallback:
if (isfield(meminfo_numeric,"MemAvailable"))
AvailableRAM = meminfo_numeric.MemAvailable * kiB;
else
# on kernels from before 2014 MemAvailable is not present
# this is a rough estimate to be used instead
AvailableRAM = (meminfo_numeric.FreeRAM + meminfo_numeric.Cached) * kiB;
endif
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9924>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, (continued)
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/02
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/05/02
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/03
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Guillaume, 2020/05/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Guillaume, 2020/05/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/21
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/05/23
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Philip Nienhuis, 2020/05/23
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/24
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function,
Lars Kindermann <=
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/24
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Lars Kindermann, 2020/05/24
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/24
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Markus Mützel, 2020/05/27
- [Octave-patch-tracker] [patch #9924] Suggestion for a memory() function, Pantxo Diribarne, 2020/05/28