Commit 028443b
fs, file table: reinit files_stat.max_files after deferred memory initialisation
Dave Hansen reported the following;
My laptop has been behaving strangely with 4.2-rc2. Once I log
in to my X session, I start getting all kinds of strange errors
from applications and see this in my dmesg:
VFS: file-max limit 8192 reached
The problem is that the file-max is calculated before memory is fully
initialised and miscalculates how much memory the kernel is using. This
patch recalculates file-max after deferred memory initialisation. Note
that using memory hotplug infrastructure would not have avoided this
problem as the value is not recalculated after memory hot-add.
4.1: files_stat.max_files = 6582781
4.2-rc2: files_stat.max_files = 8192
4.2-rc2 patched: files_stat.max_files = 6562467
Small differences with the patch applied and 4.1 but not enough to matter.
Signed-off-by: Mel Gorman <[email protected]>
Reported-by: Dave Hansen <[email protected]>
Cc: Nicolai Stange <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Alex Ng <[email protected]>
Cc: Fengguang Wu <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 78cdbab commit 028443b
File tree
5 files changed
+25
-22
lines changed- fs
- include/linux
- init
- mm
5 files changed
+25
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3442 | 3442 | | |
3443 | 3443 | | |
3444 | 3444 | | |
3445 | | - | |
| 3445 | + | |
3446 | 3446 | | |
3447 | | - | |
3448 | | - | |
3449 | | - | |
3450 | | - | |
3451 | | - | |
3452 | | - | |
3453 | | - | |
3454 | | - | |
3455 | 3447 | | |
3456 | 3448 | | |
3457 | 3449 | | |
3458 | 3450 | | |
3459 | 3451 | | |
3460 | | - | |
| 3452 | + | |
| 3453 | + | |
3461 | 3454 | | |
3462 | 3455 | | |
3463 | 3456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
| 312 | + | |
312 | 313 | | |
313 | | - | |
314 | | - | |
315 | 314 | | |
316 | 315 | | |
| 316 | + | |
| 317 | + | |
317 | 318 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
322 | 330 | | |
323 | | - | |
324 | 331 | | |
325 | | - | |
326 | 332 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
2245 | 2246 | | |
2246 | 2247 | | |
2247 | 2248 | | |
2248 | | - | |
| 2249 | + | |
2249 | 2250 | | |
2250 | 2251 | | |
2251 | 2252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
| 659 | + | |
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
| |||
0 commit comments