mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
Linux kernel source tree
Eric Dumazet says: ==================== net: introduce net_aligned_data ____cacheline_aligned_in_smp on small fields like tcp_memory_allocated and udp_memory_allocated is not good enough. It makes sure to put these fields at the start of a cache line, but does not prevent the linker from using the cache line for other fields, with potential performance impact. nm -v vmlinux|egrep -5 "tcp_memory_allocated|udp_memory_allocated" ... ffffffff83e35cc0 B tcp_memory_allocated ffffffff83e35cc8 b __key.0 ffffffff83e35cc8 b __tcp_tx_delay_enabled.1 ffffffff83e35ce0 b tcp_orphan_timer ... ffffffff849dddc0 B udp_memory_allocated ffffffff849dddc8 B udp_encap_needed_key ffffffff849dddd8 B udpv6_encap_needed_key ffffffff849dddf0 b inetsw_lock One solution is to move these sensitive fields to a structure, so that the compiler is forced to add empty holes between each member. nm -v vmlinux|egrep -2 "tcp_memory_allocated|udp_memory_allocated|net_aligned_data" ffffffff885af970 b mem_id_init ffffffff885af980 b __key.0 ffffffff885af9c0 B net_aligned_data ffffffff885afa80 B page_pool_mem_providers ffffffff885afa90 b __key.2 v1: https://lore.kernel.org/netdev/20250627200551.348096-1-edumazet@google.com/ ==================== Link: https://patch.msgid.link/20250630093540.3052835-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> |
||
|---|---|---|
| arch | ||
| block | ||
| certs | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| fs | ||
| include | ||
| init | ||
| io_uring | ||
| ipc | ||
| kernel | ||
| lib | ||
| LICENSES | ||
| mm | ||
| net | ||
| rust | ||
| samples | ||
| scripts | ||
| security | ||
| sound | ||
| tools | ||
| usr | ||
| virt | ||
| .clang-format | ||
| .clippy.toml | ||
| .cocciconfig | ||
| .editorconfig | ||
| .get_maintainer.ignore | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .pylintrc | ||
| .rustfmt.toml | ||
| COPYING | ||
| CREDITS | ||
| Kbuild | ||
| Kconfig | ||
| MAINTAINERS | ||
| Makefile | ||
| README | ||
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.