postgresql/src/include/storage
Tomas Vondra 65c298f61f Add support for basic NUMA awareness
Add basic NUMA awareness routines, using a minimal src/port/pg_numa.c
portability wrapper and an optional build dependency, enabled by
--with-libnuma configure option. For now this is Linux-only, other
platforms may be supported later.

A built-in SQL function pg_numa_available() allows checking NUMA
support, i.e. that the server was built/linked with the NUMA library.

The main function introduced is pg_numa_query_pages(), which allows
determining the NUMA node for individual memory pages. Internally the
function uses move_pages(2) syscall, as it allows batching, and is more
efficient than get_mempolicy(2).

Author: Jakub Wartak <jakub.wartak@enterprisedb.com>
Co-authored-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/CAKZiRmxh6KWo0aqRqvmcoaX2jUxZYb4kGp3N%3Dq1w%2BDiH-696Xw%40mail.gmail.com
2025-04-07 23:08:17 +02:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
aio.h bufmgr: Implement AIO read support 2025-03-30 17:28:03 -04:00
aio_internal.h aio: Make AIO more compatible with valgrind 2025-04-07 15:20:30 -04:00
aio_subsys.h aio: Infrastructure for io_method=worker 2025-03-18 11:54:01 -04:00
aio_types.h aio: Add WARNING result status 2025-03-30 16:27:10 -04:00
barrier.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
block.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
buf.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
buf_internals.h aio: Add test_aio module 2025-04-01 13:47:46 -04:00
buffile.h Swap order of extern/static and pg_nodiscard 2025-03-14 07:18:07 +01:00
bufmgr.h Enable IO concurrency on all systems 2025-03-30 19:16:47 -04:00
bufpage.h bufmgr: Implement AIO read support 2025-03-30 17:28:03 -04:00
bulk_write.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
checksum.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
checksum_impl.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
condition_variable.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
copydir.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
dsm.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
dsm_impl.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
dsm_registry.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
fd.h aio: Implement support for reads in smgr/md/fd 2025-03-29 13:38:35 -04:00
fileset.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
freespace.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
fsm_internals.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
indexfsm.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
io_worker.h aio: Infrastructure for io_method=worker 2025-03-18 11:54:01 -04:00
ipc.h pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
item.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
itemid.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
itemptr.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
large_object.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
latch.h Split WaitEventSet functions to separate source file 2025-03-06 01:26:16 +02:00
lmgr.h Add GUC option to log lock acquisition failures. 2025-03-14 23:14:12 +09:00
lock.h Fix crash if LockErrorCleanup() is called twice 2025-03-28 20:19:17 +02:00
lockdefs.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
lwlock.h aio: Add io_method=io_uring 2025-03-26 19:49:13 -04:00
lwlocklist.h Get rid of WALBufMappingLock 2025-04-02 12:44:24 +03:00
md.h aio: Implement support for reads in smgr/md/fd 2025-03-29 13:38:35 -04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
off.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_sema.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_shmem.h Add support for basic NUMA awareness 2025-04-07 23:08:17 +02:00
pmsignal.h Improve error message when standby does accept connections. 2025-04-02 15:13:01 +09:00
predicate.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
predicate_internals.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
proc.h aio: Infrastructure for io_method=worker 2025-03-18 11:54:01 -04:00
procarray.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
proclist.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
proclist_types.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
procnumber.h Fix comment for MAX_BACKENDS. 2025-02-24 15:02:09 -06:00
procsignal.h Make cancel request keys longer 2025-04-02 16:41:48 +03:00
read_stream.h read_stream: Introduce and use optional batchmode support 2025-03-30 18:36:41 -04:00
reinit.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
relfilelocator.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
s_lock.h Use a non-locking initial test in TAS_SPIN on AArch64. 2025-01-10 13:18:04 -06:00
sharedfileset.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shm_mq.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shm_toc.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shmem.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
sinval.h Avoid invalidating all RelationSyncCache entries on publication rename. 2025-03-13 09:16:33 +05:30
sinvaladt.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
smgr.h aio: Implement support for reads in smgr/md/fd 2025-03-29 13:38:35 -04:00
spin.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
standby.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
standbydefs.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
sync.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
waiteventset.h Fix compiler warnings about typedef redefinitions 2025-03-06 03:10:22 +02:00