lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <45d9cf65-7d23-475b-83d0-4bf649553b02@bena.rocks>
Date: Sun, 23 Jun 2024 14:56:53 +0200
From: Petr Bena <petr@...a.rocks>
To: linux-kernel@...r.kernel.org
Subject: Why is Dirty and Writeback part of "MemAvailable" in /proc/meminfo?

Hello,

Apologies if this is already answered somewhere, but quick google search 
returned nothing on-topic:

There is one thing that really puzzles me about /proc/meminfo (and 
subsequently about data reported by all other tools, like free, top etc. 
that take those numbers from same place) - why is "dirty" and 
"writeback" part of "available" memory?

My understanding is that "available" was introduced to confuse less 
users by relatively low amount of "free" memory, which is very often 
occupied by disk and FS caches as it can be dropped almost any time as 
needed, but that's not quite the case with writeback and dirty memory - 
both of them have to be written to the disk first, which is not an 
instant operation, in fact with slow storage it takes some time during 
which memory is unusable, so there is nothing inherently "available" 
about that memory.

If you configure your kernel for aggressive caching and run some large 
IO writing operations, most of your memory is going to be full by dirty 
pages and should some program need to quickly allocate it, it would 
fail, yet /proc/meminfo would be reporting plenty of available memory.

Shouldn't this logic be changed? What's the reasoning behind that?

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ