linux/Documentation
Linus Torvalds 6cb0bd94c0 Persistent buffer cleanups and simplifications for v6.15:
It was mistaken that the physical memory returned from "reserve_mem" had to
 be vmap()'d to get to it from a virtual address. But reserve_mem already
 maps the memory to the virtual address of the kernel so a simple
 phys_to_virt() can be used to get to the virtual address from the physical
 memory returned by "reserve_mem". With this new found knowledge, the
 code can be cleaned up and simplified.
 
 - Enforce that the persistent memory is page aligned
 
   As the buffers using the persistent memory are all going to be
   mapped via pages, make sure that the memory given to the tracing
   infrastructure is page aligned. If it is not, it will print a warning
   and fail to map the buffer.
 
 - Use phys_to_virt() to get the virtual address from reserve_mem
 
   Instead of calling vmap() on the physical memory returned from
   "reserve_mem", use phys_to_virt() instead.
 
   As the memory returned by "memmap" or any other means where a physical
   address is given to the tracing infrastructure, it still needs to
   be vmap(). Since this memory can never be returned back to the buddy
   allocator nor should it ever be memmory mapped to user space, flag
   this buffer and up the ref count. The ref count will keep it from
   ever being freed, and the flag will prevent it from ever being memory
   mapped to user space.
 
 - Use vmap_page_range() for memmap virtual address mapping
 
   For the memmap buffer, instead of allocating an array of struct pages,
   assigning them to the contiguous phsycial memory and then passing that to
   vmap(), use vmap_page_range() instead
 
 - Replace flush_dcache_folio() with flush_kernel_vmap_range()
 
   Instead of calling virt_to_folio() and passing that to
   flush_dcache_folio(), just call flush_kernel_vmap_range() directly.
   This also fixes a bug where if a subbuffer was bigger than PAGE_SIZE
   only the PAGE_SIZE portion would be flushed.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZ+6oZRQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qhq6AP481KHAgaowQCg7zrKPkMlbYBIigYoU
 7aqoAg2rSLBRSQEAl8fViHZgZ9Q+O7xdozQWiIR7/KQW8VIaTcP/V7cHkAU=
 =+5JB
 -----END PGP SIGNATURE-----

Merge tag 'trace-ringbuffer-v6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull ring-buffer updates from Steven Rostedt:
 "Persistent buffer cleanups and simplifications.

  It was mistaken that the physical memory returned from "reserve_mem"
  had to be vmap()'d to get to it from a virtual address. But
  reserve_mem already maps the memory to the virtual address of the
  kernel so a simple phys_to_virt() can be used to get to the virtual
  address from the physical memory returned by "reserve_mem". With this
  new found knowledge, the code can be cleaned up and simplified.

   - Enforce that the persistent memory is page aligned

     As the buffers using the persistent memory are all going to be
     mapped via pages, make sure that the memory given to the tracing
     infrastructure is page aligned. If it is not, it will print a
     warning and fail to map the buffer.

   - Use phys_to_virt() to get the virtual address from reserve_mem

     Instead of calling vmap() on the physical memory returned from
     "reserve_mem", use phys_to_virt() instead.

     As the memory returned by "memmap" or any other means where a
     physical address is given to the tracing infrastructure, it still
     needs to be vmap(). Since this memory can never be returned back to
     the buddy allocator nor should it ever be memmory mapped to user
     space, flag this buffer and up the ref count. The ref count will
     keep it from ever being freed, and the flag will prevent it from
     ever being memory mapped to user space.

   - Use vmap_page_range() for memmap virtual address mapping

     For the memmap buffer, instead of allocating an array of struct
     pages, assigning them to the contiguous phsycial memory and then
     passing that to vmap(), use vmap_page_range() instead

   - Replace flush_dcache_folio() with flush_kernel_vmap_range()

     Instead of calling virt_to_folio() and passing that to
     flush_dcache_folio(), just call flush_kernel_vmap_range() directly.
     This also fixes a bug where if a subbuffer was bigger than
     PAGE_SIZE only the PAGE_SIZE portion would be flushed"

* tag 'trace-ringbuffer-v6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  ring-buffer: Use flush_kernel_vmap_range() over flush_dcache_folio()
  tracing: Use vmap_page_range() to map memmap ring buffer
  tracing: Have reserve_mem use phys_to_virt() and separate from memmap buffer
  tracing: Enforce the persistent ring buffer to be page aligned
History 2025-04-03 16:09:29 -07:00
..
ABI cxl for v6.15 2025-04-02 20:04:43 -07:00
accel accel/amdxdna: Add documentation for AMD NPU accelerator driver 2024-11-22 11:40:56 -07:00
accounting Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
admin-guide Persistent buffer cleanups and simplifications for v6.15: 2025-04-03 16:09:29 -07:00
arch powerpc updates for 6.15 #2 2025-04-02 12:35:49 -07:00
block Documentation: ublk: remove dead footnote 2025-03-31 07:06:22 -06:00
bpf bpf, docs: Fix broken link to renamed bpf_iter_task_vmas.c 2025-03-15 11:48:56 -07:00
cdrom scsi: sr: Fix unintentional arithmetic wraparound 2024-05-15 10:05:24 -04:00
core-api - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
cpu-freq Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
crypto crypto: remove obsolete 'comp' compression API 2025-03-21 17:39:06 +08:00
dev-tools It has been a reasonably busy cycle for docs... 2025-03-24 18:42:27 -07:00
devicetree RTC for 6.15 2025-04-03 15:31:14 -07:00
doc-guide Documentation: kernel-doc: enumerate identifier *type*s 2024-11-22 10:37:40 -07:00
driver-api cxl for v6.15 2025-04-02 20:04:43 -07:00
edac EDAC: Add a memory repair control feature 2025-02-26 11:13:23 +01:00
fault-injection net: Implement fault injection forcing skb reallocation 2024-11-12 12:05:33 +01:00
fb fbdev/intelfb: Remove driver 2024-01-12 12:38:37 +01:00
features mseal sysmap: add arch-support txt 2025-04-01 15:17:17 -07:00
filesystems 9p update for 6.15-rc1 2025-04-03 15:35:46 -07:00
firmware-guide Documentation: firmware-guide: ACPI: Fix namespace typo 2024-04-26 18:58:13 +02:00
firmware_class firmware: revamp firmware documentation 2017-01-11 09:42:59 +01:00
fpga Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
gpu Core Changes: 2025-03-14 17:02:11 +10:00
hid HID: THC: Add documentation 2025-01-09 10:14:14 +01:00
hwmon hwmon: add driver for HTU31 2025-03-18 08:03:40 -07:00
i2c i2c-host updates for v6.13, part 1 2024-11-18 08:35:47 +01:00
iio Char/Misc/IIO driver updates for 6.15-rc1 2025-04-01 11:26:08 -07:00
images docs: add SVG version of the Linux logo 2022-06-01 09:32:45 -06:00
infiniband docs: infiniband: document the UCAP API 2025-03-09 13:13:02 -04:00
input Documentation: input: Add section pertaining to polled input devices 2025-02-21 13:29:53 -07:00
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for v6.14 2025-01-31 12:07:07 -08:00
kernel-hacking docs/licensing: Clarify wording about "GPL" and "Proprietary" 2024-11-22 10:44:25 -07:00
leds Documentation:leds: Add leds-st1202.rst 2025-01-09 10:30:23 +00:00
litmus-tests Documentation/litmus-tests: Make cmpxchg() tests safe for klitmus 2024-05-06 14:29:21 -07:00
livepatch docs: livepatch: move text out of code block 2025-03-04 16:01:29 +01:00
locking hwspinlock: Remove unused hwspin_lock_get_id() 2025-03-21 17:12:04 -05:00
maintainer docs: Remove redundant word "for" 2024-10-21 09:32:20 -06:00
mhi docs: Add documentation for MHI bus 2020-03-19 07:41:04 +01:00
misc-devices misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver 2024-07-10 14:58:29 +02:00
mm - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
netlabel docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
netlink NFSD 6.15 Release Notes 2025-03-31 17:28:17 -07:00
networking for-6.15/io_uring-rx-zc-20250325 2025-03-28 13:45:52 -07:00
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
nvme Documentation: typo fixes 2025-02-18 14:01:22 -07:00
PCI PCI: endpoint: Remove unused devm_pci_epc_destroy() 2025-03-08 14:47:31 +00:00
pcmcia Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
peci Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
power Two fixes for footnote-related warnings that appeared with Sphinx 8.x. 2025-01-30 10:57:19 -08:00
process Devicetree for v6.15: 2025-03-29 11:23:16 -07:00
RCU - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
rust ARM and clkdev updates for 6.15-rc1 2025-04-03 12:21:44 -07:00
scheduler Scheduler updates for v6.15: 2025-03-24 21:28:12 -07:00
scsi scsi: st: Add sysfs file position_lost_in_reset 2025-02-03 17:51:31 -05:00
security Hi, 2025-03-28 12:42:53 -07:00
sound sound updates for 6.15-rc1 2025-03-26 09:41:55 -07:00
sphinx docs: automarkup: drop legacy support 2025-02-18 13:42:46 -07:00
sphinx-static docs: translations: add translations links when they exist 2023-12-19 14:34:59 -07:00
spi spi: Enable controllers to extend the SPI protocol with MOSI idle configuration 2024-07-29 01:19:51 +01:00
staging Documentation: Fix incorrect paths/magic in magic numbers rst 2024-11-04 12:34:59 -07:00
sunrpc/xdr nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
tee Documentation: tee: Add TS-TEE driver 2024-04-03 14:03:09 +02:00
timers timers/Documentation: Cleanup delay/sleep documentation 2024-10-16 00:36:48 +02:00
tools Documentation/rv: Add sched pages to the indices 2025-03-27 12:02:38 -04:00
trace Persistent buffer cleanups and simplifications for v6.15: 2025-04-03 16:09:29 -07:00
translations - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
usb USB/Thunderbolt update for 6.15-rc1 2025-04-02 18:23:31 -07:00
userspace-api - The 2 patch series "mm: fixes for fallouts from mem_init() cleanup" 2025-04-03 11:10:00 -07:00
virt KVM/arm64 updates for 6.15 2025-03-20 12:54:12 -04:00
w1 w1: add UART w1 bus driver 2024-02-15 15:02:33 +01:00
watchdog watchdog: Delete the cpu5wdt driver 2024-11-05 10:04:39 +01:00
wmi platform/x86: wmi: Update documentation regarding the GUID-based API 2025-02-24 13:30:58 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
atomic_bitops.txt wait_on_bit: add an acquire memory barrier 2022-08-26 09:30:25 -07:00
atomic_t.txt Documentation/atomic_t: Emphasize that failed atomic operations give no ordering 2024-05-06 14:29:04 -07:00
Changes docs: add back 'Documentation/Changes' file (as symlink) 2016-12-14 16:30:12 -08:00
CodingStyle doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
conf.py docs: changes: update Sphinx minimal version to 3.4.3 2025-02-13 11:33:32 -07:00
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
index.rst doc: fix spelling about ReStructured Text 2024-04-02 10:07:51 -06:00
Kconfig Documentation: Avoid duplicate Kconfig inclusion 2023-01-19 13:56:34 -07:00
Makefile docs: Makefile: use the new script to check for bad ABI references 2025-02-13 09:44:30 -07:00
memory-barriers.txt docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY" 2024-09-13 23:56:44 -07:00
SubmittingPatches doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
subsystem-apis.rst Documentation/EDAC: Fix warning document isn't included in any toctree 2025-04-01 22:26:47 +02:00