upper limit on wait table size
Subsystems (2)
PATCH 1/1 upper limit on wait table size
# This is a BitKeeper generated patch for the following project:
# Project Name: Long-term Linux VM development
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.201 ->
# mm/page_alloc.c 1.60 -> 1.61
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/17 [email protected] 1.202
# Set upper limits on the maximum number of waitqueue table entries. # --------------------------------------------
#
mm/page_alloc.c +16 -0
@@ -825,6 +825,22 @@while (size < pages) size <<=1 ; +/* +* 16384 blocked kernel threads seems like a reasonable +* number and this throttles the growth of the wait table +* to something bounded above by something resembling +* approximately the maximum number of kernel threads +* expected. This limit will trigger at 16K*4K*256 = 16GB +* on i386. The hard upper bound for i386 is then +* 16K*12B = 192KB, which is large but acceptable. For +* uniprocessor machines 4096 threads is a more likely +* number. i386 UP triggers this at 4GB for a 48KB table. +*/ +if (NR_CPUS >1 ) + size =min (size,16384UL ); +else + size =min (size,4096UL ); +return size; }