Specify that kernel memory updating limitation only applies
on kernel version older than 4.6.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
| ... | ... |
@@ -37,9 +37,9 @@ limits on a single container or on many. To specify more than one container, |
| 37 | 37 |
provide space-separated list of container names or IDs. |
| 38 | 38 |
|
| 39 | 39 |
With the exception of the `--kernel-memory` option, you can specify these |
| 40 |
-options on a running or a stopped container. You can only update |
|
| 41 |
-`--kernel-memory` on a stopped container or on a running container with |
|
| 42 |
-kernel memory initialized. |
|
| 40 |
+options on a running or a stopped container. On kernel version older than |
|
| 41 |
+4.6, you can only update `--kernel-memory` on a stopped container or on |
|
| 42 |
+a running container with kernel memory initialized. |
|
| 43 | 43 |
|
| 44 | 44 |
## EXAMPLES |
| 45 | 45 |
|
| ... | ... |
@@ -66,9 +66,10 @@ $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse |
| 66 | 66 |
### Update a container's kernel memory constraints |
| 67 | 67 |
|
| 68 | 68 |
You can update a container's kernel memory limit using the `--kernel-memory` |
| 69 |
-option. This option can be updated on a running container only if the container |
|
| 70 |
-was started with `--kernel-memory`. If the container was started *without* |
|
| 71 |
-`--kernel-memory` you need to stop the container before updating kernel memory. |
|
| 69 |
+option. On kernel version older than 4.6, this option can be updated on a |
|
| 70 |
+running container only if the container was started with `--kernel-memory`. |
|
| 71 |
+If the container was started *without* `--kernel-memory` you need to stop |
|
| 72 |
+the container before updating kernel memory. |
|
| 72 | 73 |
|
| 73 | 74 |
For example, if you started a container with this command: |
| 74 | 75 |
|
| ... | ... |
@@ -92,6 +93,8 @@ Update kernel memory of running container `test2` will fail. You need to stop |
| 92 | 92 |
the container before updating the `--kernel-memory` setting. The next time you |
| 93 | 93 |
start it, the container uses the new value. |
| 94 | 94 |
|
| 95 |
+Kernel version newer than (include) 4.6 does not have this limitation, you |
|
| 96 |
+can use `--kernel-memory` the same way as other options. |
|
| 95 | 97 |
|
| 96 | 98 |
### Update a container's restart policy |
| 97 | 99 |
|
| ... | ... |
@@ -29,9 +29,9 @@ limits on a single container or on many. To specify more than one container, |
| 29 | 29 |
provide space-separated list of container names or IDs. |
| 30 | 30 |
|
| 31 | 31 |
With the exception of the **--kernel-memory** option, you can specify these |
| 32 |
-options on a running or a stopped container. You can only update |
|
| 33 |
-**--kernel-memory** on a stopped container or on a running container with |
|
| 34 |
-kernel memory initialized. |
|
| 32 |
+options on a running or a stopped container. On kernel version older than |
|
| 33 |
+4.6, You can only update **--kernel-memory** on a stopped container or on |
|
| 34 |
+a running container with kernel memory initialized. |
|
| 35 | 35 |
|
| 36 | 36 |
# OPTIONS |
| 37 | 37 |
|
| ... | ... |
@@ -59,9 +59,10 @@ kernel memory initialized. |
| 59 | 59 |
**--kernel-memory**="" |
| 60 | 60 |
Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g) |
| 61 | 61 |
|
| 62 |
- Note that you can not update kernel memory on a running container if the container |
|
| 63 |
- is started without kernel memory initialized, in this case, it can only be updated |
|
| 64 |
- after it's stopped. The new setting takes effect when the container is started. |
|
| 62 |
+ Note that on kernel version older than 4.6, you can not update kernel memory on |
|
| 63 |
+ a running container if the container is started without kernel memory initialized, |
|
| 64 |
+ in this case, it can only be updated after it's stopped. The new setting takes |
|
| 65 |
+ effect when the container is started. |
|
| 65 | 66 |
|
| 66 | 67 |
**-m**, **--memory**="" |
| 67 | 68 |
Memory limit (format: <number><optional unit>, where unit = b, k, m or g) |
| ... | ... |
@@ -100,9 +101,10 @@ $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse |
| 100 | 100 |
### Update a container's kernel memory constraints |
| 101 | 101 |
|
| 102 | 102 |
You can update a container's kernel memory limit using the **--kernel-memory** |
| 103 |
-option. This option can be updated on a running container only if the container |
|
| 104 |
-was started with **--kernel-memory**. If the container was started *without* |
|
| 105 |
-**--kernel-memory** you need to stop the container before updating kernel memory. |
|
| 103 |
+option. On kernel version older than 4.6, this option can be updated on a |
|
| 104 |
+running container only if the container was started with **--kernel-memory**. |
|
| 105 |
+If the container was started *without* **--kernel-memory** you need to stop |
|
| 106 |
+the container before updating kernel memory. |
|
| 106 | 107 |
|
| 107 | 108 |
For example, if you started a container with this command: |
| 108 | 109 |
|
| ... | ... |
@@ -126,6 +128,9 @@ Update kernel memory of running container `test2` will fail. You need to stop |
| 126 | 126 |
the container before updating the **--kernel-memory** setting. The next time you |
| 127 | 127 |
start it, the container uses the new value. |
| 128 | 128 |
|
| 129 |
+Kernel version newer than (include) 4.6 does not have this limitation, you |
|
| 130 |
+can use `--kernel-memory` the same way as other options. |
|
| 131 |
+ |
|
| 129 | 132 |
### Update a container's restart policy |
| 130 | 133 |
|
| 131 | 134 |
You can change a container's restart policy on a running container. The new |