Akinobu Mita
c42af83c59
memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory
...
memblock_estimated_nr_free_pages() returns the difference between the total
size of the "memory" memblock type and the "reserved" memblock type.
The "soft-reserved" memory regions are added to the "reserved" memblock
type, but not to the "memory" memblock type. Therefore,
memblock_estimated_nr_free_pages() may return a smaller value than
expected, or if it underflows, an extremely large value.
/proc/sys/kernel/threads-max is determined by the value of
memblock_estimated_nr_free_pages(). This issue was discovered on machines
with CXL memory because kernel.threads-max was either smaller than expected
or extremely large for the installed DRAM size.
This fixes the issue by replacing memblock_reserved_size() with
memblock_reserved_kern_size() that tells how much memory was
reserved from the actual RAM.
Suggested-by: Mike Rapoport <rppt@kernel.org >
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com >
Link: https://patch.msgid.link/20251111010010.7800-1-akinobu.mita@gmail.com
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org >
2025-11-11 18:15:35 +02:00
..
2025-10-21 15:46:18 -07:00
2025-10-02 18:18:33 -07:00
2025-09-21 14:22:09 -07:00
2025-10-07 12:48:06 -07:00
2025-10-03 12:48:18 -07:00
2025-08-19 16:35:57 -07:00
2025-03-16 22:06:27 -07:00
2025-07-24 19:12:36 -07:00
2025-03-16 22:06:24 -07:00
2025-09-21 14:22:06 -07:00
2025-05-22 14:55:36 -07:00
2025-09-28 11:51:29 -07:00
2025-05-12 23:50:38 -07:00
2025-08-19 16:35:54 -07:00
2025-09-13 16:54:56 -07:00
2025-07-01 13:25:36 -06:00
2025-01-13 22:40:59 -08:00
2025-09-28 11:51:31 -07:00
2024-11-03 01:28:06 -05:00
2024-09-01 20:43:33 -07:00
2024-09-01 20:43:33 -07:00
2025-10-03 14:20:40 -07:00
2025-03-04 17:02:25 +00:00
2025-09-21 14:22:29 -07:00
2025-09-21 14:22:15 -07:00
2025-10-03 17:41:12 -07:00
2025-10-15 13:24:34 -07:00
2025-03-17 00:05:35 -07:00
2025-09-21 14:22:11 -07:00
2025-09-21 14:22:11 -07:00
2025-07-09 22:42:05 -07:00
2025-03-16 22:06:29 -07:00
2025-10-21 15:46:17 -07:00
2025-09-21 14:22:21 -07:00
2025-03-16 22:06:20 -07:00
2025-10-02 18:18:33 -07:00
2025-03-16 22:06:23 -07:00
2025-10-02 18:18:33 -07:00
2025-03-17 00:05:32 -07:00
2025-10-03 16:42:44 -07:00
2025-09-01 17:11:37 -07:00
2025-10-03 16:42:44 -07:00
2025-07-09 22:41:56 -07:00
2025-07-09 22:42:22 -07:00
2025-10-03 16:42:43 -07:00
2025-09-21 14:21:59 -07:00
2025-07-09 22:42:17 -07:00
2025-11-11 18:15:35 +02:00
2025-09-21 14:22:26 -07:00
2025-03-21 22:03:11 -07:00
2025-10-07 14:01:11 -07:00
2025-09-21 14:22:00 -07:00
2025-10-03 16:42:43 -07:00
2025-09-21 14:22:23 -07:00
2025-09-21 14:22:29 -07:00
2025-09-28 11:51:30 -07:00
2025-07-19 18:59:45 -07:00
2025-08-02 12:06:13 -07:00
2025-09-21 14:22:21 -07:00
2025-09-13 16:54:50 -07:00
2025-10-15 13:24:34 -07:00
2025-09-21 14:22:22 -07:00
2025-09-13 13:05:36 -07:00
2025-10-04 11:03:10 -07:00
2025-09-13 16:54:43 -07:00
2025-09-22 20:17:11 -07:00
2025-09-13 16:54:58 -07:00
2025-05-12 23:50:31 -07:00
2025-09-13 16:55:07 -07:00
2025-08-11 23:00:59 -07:00
2025-10-21 15:46:17 -07:00
2025-08-02 12:06:09 -07:00
2025-09-13 16:54:46 -07:00
2025-08-20 16:31:23 +03:00
2025-08-20 16:31:23 +03:00
2025-05-12 23:50:38 -07:00
2025-09-23 14:14:16 -07:00
2025-10-02 18:18:33 -07:00
2025-03-17 00:05:35 -07:00
2025-07-13 16:38:16 -07:00
2025-01-13 22:40:31 -08:00
2025-06-17 10:44:15 +02:00
2025-09-21 14:22:23 -07:00
2025-07-13 16:38:29 -07:00
2025-10-15 13:24:33 -07:00
2025-05-09 13:43:07 +01:00
2025-09-28 11:51:29 -07:00
2025-10-03 12:48:18 -07:00
2025-10-02 18:18:33 -07:00
2025-09-21 14:22:04 -07:00
2025-07-13 16:38:23 -07:00
2025-09-08 23:45:10 -07:00
2025-07-09 22:42:17 -07:00
2024-11-05 16:56:23 -08:00
2025-01-13 22:40:48 -08:00
2025-07-09 22:42:20 -07:00
2025-09-21 14:22:28 -07:00
2025-09-28 11:51:31 -07:00
2025-01-13 22:40:38 -08:00
2025-07-31 14:57:54 -07:00
2024-09-01 20:25:45 -07:00
2025-10-02 18:18:33 -07:00
2025-09-21 14:22:29 -07:00
2025-03-17 00:05:40 -07:00
2024-10-31 20:27:04 -07:00
2025-09-29 09:42:36 +02:00
2025-10-02 18:18:33 -07:00
2025-11-06 08:13:12 +01:00
2025-08-27 22:45:44 -07:00
2025-09-13 16:55:07 -07:00
2025-03-17 22:06:58 -07:00
2025-09-21 14:22:25 -07:00
2025-09-21 14:22:25 -07:00
2025-09-21 14:22:32 -07:00
2025-09-21 14:22:25 -07:00
2025-09-28 11:51:34 -07:00
2025-06-02 16:00:26 -07:00
2025-02-28 11:51:31 -08:00
2025-09-21 14:22:22 -07:00
2025-10-07 14:01:12 -07:00
2025-07-09 22:42:11 -07:00
2025-10-02 18:18:33 -07:00
2025-01-13 22:40:42 -08:00
2025-09-22 20:17:11 -07:00
2025-09-22 20:17:11 -07:00
2025-09-23 14:14:16 -07:00
2025-07-24 19:12:32 -07:00
2025-09-21 14:22:29 -07:00
2025-09-21 14:22:29 -07:00
2025-09-13 16:55:07 -07:00
2025-09-21 14:21:59 -07:00
2025-09-21 14:21:59 -07:00
2025-09-21 14:22:25 -07:00