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
2025-04-03 16:09:29 -07:00
..
ABI cxl for v6.15 2025-04-02 20:04:43 -07:00
PCI PCI: endpoint: Remove unused devm_pci_epc_destroy() 2025-03-08 14:47:31 +00:00
RCU - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
accel
accounting
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
core-api - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
cpu-freq
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
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
fb
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
firmware_class
fpga
gpu Core Changes: 2025-03-14 17:02:11 +10:00
hid
hwmon hwmon: add driver for HTU31 2025-03-18 08:03:40 -07:00
i2c
iio Char/Misc/IIO driver updates for 6.15-rc1 2025-04-01 11:26:08 -07:00
images
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
kbuild
kernel-hacking
leds
litmus-tests
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
mhi
misc-devices
mm - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
netlabel
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
nvme
pcmcia
peci
power
process Devicetree for v6.15: 2025-03-29 11:23:16 -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
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
sphinx-static
spi
staging
sunrpc/xdr
target
tee
timers
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
watchdog
wmi platform/x86: wmi: Update documentation regarding the GUID-based API 2025-02-24 13:30:58 +02:00
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
index.rst
memory-barriers.txt
subsystem-apis.rst Documentation/EDAC: Fix warning document isn't included in any toctree 2025-04-01 22:26:47 +02:00