aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_generic.c
diff options
context:
space:
mode:
authorAbdelkader Boudih <freebsd@seuros.com>2026-08-03 18:12:19 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2026-08-03 18:15:15 +0000
commit9590878fca68e62c63d607da73139698e204d0f0 (patch)
tree6ff73e849e0f0c05f1a32cd2bcec39a62793e103 /sys/dev/netmap/netmap_generic.c
parent5078280bb42c00eecffeabf93706c145e87b4b2b (diff)
kqueue: stream the knote report instead of buffering all of it
kern_proc_kqueues_out() sized its intermediate sbuf from the preceding sizing pass, so dumping core for a process with many knotes wired a buffer as large as the entire report. Shrank the intermediate to one page and added a drain that copied into the caller's sbuf up to maxlen, stopping the walk once it was reached. Truncation stayed byte exact. A dump of 384k knotes peaked at 20 KB of M_SBUF instead of 445 MB. Reviewed by: adrian, markj Differential Revision: https://reviews.freebsd.org/D58584 MFC after: 1 week
Diffstat (limited to 'sys/dev/netmap/netmap_generic.c')
0 files changed, 0 insertions, 0 deletions