diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-07-24 10:50:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-28 01:34:36 -0400 |
commit | 1bab4c75075b84675b96992ac47580a57c26958d (patch) | |
tree | d015ddcf9d9d16e423efb63e9ddbd46fb02d95c3 /Documentation/networking | |
parent | ab1c724f633080ed2e8a0cfe61654599b55cf8f9 (diff) |
inet: frag: set limits and make init_net's high_thresh limit global
This patch makes init_net's high_thresh limit to be the maximum for all
namespaces, thus introducing a global memory limit threshold equal to the
sum of the individual high_thresh limits which are capped.
It also introduces some sane minimums for low_thresh as it shouldn't be
able to drop below 0 (or > high_thresh in the unsigned case), and
overall low_thresh should not ever be above high_thresh, so we make the
following relations for a namespace:
init_net:
high_thresh - max(not capped), min(init_net low_thresh)
low_thresh - max(init_net high_thresh), min (0)
all other namespaces:
high_thresh = max(init_net high_thresh), min(namespace's low_thresh)
low_thresh = max(namespace's high_thresh), min(0)
The major issue with having low_thresh > high_thresh is that we'll
schedule eviction but never evict anything and thus rely only on the
timers.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index e8c304e37831..29a93518bf18 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -101,7 +101,8 @@ ipfrag_high_thresh - INTEGER | |||
101 | Maximum memory used to reassemble IP fragments. When | 101 | Maximum memory used to reassemble IP fragments. When |
102 | ipfrag_high_thresh bytes of memory is allocated for this purpose, | 102 | ipfrag_high_thresh bytes of memory is allocated for this purpose, |
103 | the fragment handler will toss packets until ipfrag_low_thresh | 103 | the fragment handler will toss packets until ipfrag_low_thresh |
104 | is reached. | 104 | is reached. This also serves as a maximum limit to namespaces |
105 | different from the initial one. | ||
105 | 106 | ||
106 | ipfrag_low_thresh - INTEGER | 107 | ipfrag_low_thresh - INTEGER |
107 | Maximum memory used to reassemble IP fragments before the kernel | 108 | Maximum memory used to reassemble IP fragments before the kernel |