Skip to contentSkip to conversation

Documentation: incorrect formula to calculate CommitLimit value

PATCH In review Petr Oros 2 participants 2 messages May 22, 2014 Documentation

lore
Share & tools
lore

Petr Oros

author
#0 lore raw

PATCH 1/1 Documentation: incorrect formula to calculate CommitLimit value

The formula to calculate "CommitLimit" value mentioned in kernel documentation is incorrect.
Right formula is: CommitLimit = ([total RAM pages] - [total huge TLB pages]) * overcommit_ratio / 100 + [total swap pages]

---
 Documentation/filesystems/proc.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/proc.txt +2 -1
index 8b9cd8e..b58d764 100644
@@ -854,7 +854,8 @@ WritebackTmp: Memory used by FUSE for temporary writeback buffers
               if strict overcommit accounting is enabled (mode 2 in
               'vm.overcommit_memory').
               The CommitLimit is calculated with the following formula:
-              CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap
+              CommitLimit = ([total RAM pages] - [total huge TLB pages]) *
+                             overcommit_ratio / 100 + [total swap pages]
               For example, on a system with 1G of physical RAM and 7G
               of swap with a `vm.overcommit_ratio` of 30 it would
               yield a CommitLimit of 7.3G.
Signature · 1 line
1.9.0
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Petr Oros

The formula to calculate "CommitLimit" value mentioned in kernel documentation is incorrect.
Right formula is: CommitLimit = ([total RAM pages] - [total huge TLB pages]) * overcommit_ratio / 100 + [total swap pages]

Jiri, please grab this patch.

Thanks.

Quoted 19 lines
---
 Documentation/filesystems/proc.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/proc.txt +2 -1
index 8b9cd8e..b58d764 100644
@@ -854,7 +854,8 @@ WritebackTmp: Memory used by FUSE for temporary writeback buffers
               if strict overcommit accounting is enabled (mode 2 in
               'vm.overcommit_memory').
               The CommitLimit is calculated with the following formula:
-              CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap
+              CommitLimit = ([total RAM pages] - [total huge TLB pages]) *
+                             overcommit_ratio / 100 + [total swap pages]
               For example, on a system with 1G of physical RAM and 7G
               of swap with a `vm.overcommit_ratio` of 30 it would
               yield a CommitLimit of 7.3G.
Signature · 1 line
~Randy