|
|
Subscribe / Log in / New account

drastic performance gains

drastic performance gains

Posted Aug 2, 2021 0:25 UTC (Mon) by jreiser (subscriber, #11027)
In reply to: Strict memcpy() bounds checking for the kernel by rurban
Parent article: Strict memcpy() bounds checking for the kernel

In the linked file perf_memcpy_s.c, I saw uniform weighting of chunks that are all multiples of 1 KiB. What happens for a model that is closer to actual usage in the Linux kernel? The kernel has obvious special cases for filesystems, network stack, and general management of pages; but what about the rest? Measuring the task of re-compiling and re-building the kernel under the configurations "all module" and "all yes" are two interesting cases.

In user space, a very large portion of allocations by malloc() are for 100 bytes or fewer, which constrains memcpy to "small" lengths on average. See http://www.linuxplumbersconf.net/2016/ocw//system/presentations/3921/original/LPC%202016%20-%20linux%20and%20glibc_%20The%204.5TiB%20malloc%20API%20trace.pdf.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds