linux-stable/include/acpi
Suren Baghdasaryan 2c321f3f70 mm: change inlined allocation helpers to account at the call site
Main goal of memory allocation profiling patchset is to provide accounting
that is cheap enough to run in production.  To achieve that we inject
counters using codetags at the allocation call sites to account every time
allocation is made.  This injection allows us to perform accounting
efficiently because injected counters are immediately available as opposed
to the alternative methods, such as using _RET_IP_, which would require
counter lookup and appropriate locking that makes accounting much more
expensive.  This method requires all allocation functions to inject
separate counters at their call sites so that their callers can be
individually accounted.  Counter injection is implemented by allocation
hooks which should wrap all allocation functions.

Inlined functions which perform allocations but do not use allocation
hooks are directly charged for the allocations they perform.  In most
cases these functions are just specialized allocation wrappers used from
multiple places to allocate objects of a specific type.  It would be more
useful to do the accounting at their call sites instead.  Instrument these
helpers to do accounting at the call site.  Simple inlined allocation
wrappers are converted directly into macros.  More complex allocators or
allocators with documentation are converted into _noprof versions and
allocation hooks are added.  This allows memory allocation profiling
mechanism to charge allocations to the callers of these functions.

Link: https://lkml.kernel.org/r/20240415020731.1152108-1-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Jan Kara <jack@suse.cz>		[jbd2]
Cc: Anna Schumaker <anna@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-25 20:55:59 -07:00
..
platform mm: change inlined allocation helpers to account at the call site 2024-04-25 20:55:59 -07:00
acbuffer.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acconfig.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acexcep.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acnames.h ACPICA: Detect GED device and keep track of _EVT 2023-07-10 18:33:47 +02:00
acoutput.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acpi.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acpi_bus.h ACPI: bus: allow _UID matching for integer zero 2024-04-08 16:57:51 +02:00
acpi_drivers.h ACPI: platform: Move SMB0001 HID to the header and reuse 2023-07-04 19:28:20 +02:00
acpi_io.h Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
acpi_lpat.h
acpi_numa.h ACPI: processor: Replace kernel.h with the necessary inclusions 2021-11-24 17:44:04 +01:00
acpiosxf.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acpixf.h Merge branches 'acpi-scan', 'acpi-tad', 'acpi-extlog' and 'acpi-misc' 2023-08-25 20:49:52 +02:00
acrestyp.h ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array 2023-04-06 20:29:12 +02:00
actbl.h ACPI: CPPC: Add definition for undefined FADT preferred PM profile value 2023-06-21 18:44:56 +02:00
actbl1.h ACPICA: Add defines for CDAT SSLBIS 2023-10-03 16:04:22 +02:00
actbl2.h ACPICA: MADT: Add new MADT GICC/GICR/ITS non-coherent flags handling 2024-01-09 15:25:37 +01:00
actbl3.h ACPICA: Add a define for size of struct acpi_srat_generic_affinity device_handle 2023-07-10 18:49:16 +02:00
actypes.h ACPI updates for 6.4-rc1 2023-04-25 18:37:41 -07:00
acuuid.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
apei.h ACPI: APEI: Fix missing ERST record id 2022-04-13 20:29:24 +02:00
battery.h ACPI: battery: Pass battery hook pointer to hook callbacks 2022-11-16 08:48:18 +01:00
button.h
cppc_acpi.h ACPI: CPPC: Add helper to get the highest performance value 2024-01-31 14:54:50 +01:00
ghes.h ACPI: APEI: Fix AER info corruption when error status data has multiple sections 2023-09-21 20:44:23 +02:00
hed.h
nfit.h
pcc.h ACPI: PCC: Add PCC shared memory region command and status bitfields 2023-09-28 15:48:48 +01:00
proc_cap_intel.h ACPI: processor: Introduce acpi_processor_osc() 2023-07-14 17:59:40 +02:00
processor.h cpu-hotplug: Provide prototypes for arch CPU registration 2023-10-11 14:27:37 +02:00
reboot.h
video.h ACPI: video: Add comment about acpi_video_backlight_use_native() usage 2023-11-20 17:47:07 +01:00