Commit graph

3623 commits

Author SHA1 Message Date
Slobodan Predolac
4ec54f3a4b Do not release the hpa_shard->mtx when inserting newly retrieved page from central before allocating from it 2025-10-09 15:39:07 -04:00
Carl Shapiro
e1d78cfa6b Inline the value of an always false boolean local variable
Next to its use, which is always as an argument, we include the name
of the parameter in a constant.  This completes a partially
implemented cleanup suggested in an earlier commit.
2025-10-07 14:55:36 -07:00
Slobodan Predolac
a8742091f3 [EASY] Spelling in the comments 2025-10-07 14:52:13 -07:00
Slobodan Predolac
323bda69be Add npurges and npurge_passes to output of pa_benchmark 2025-10-06 10:12:42 -07:00
Slobodan Predolac
75324f566e [pa-bench] Add clock to pa benchmark 2025-10-06 10:12:42 -07:00
Slobodan Predolac
97d610044c [HPA] Add ability to start page as huge and more flexibility for purging 2025-10-06 10:59:43 -04:00
Slobodan Predolac
ec503b43db Running clang-format on two files 2025-10-06 10:59:43 -04:00
Slobodan Predolac
8ce81ac2f7 Revert "Do not dehugify when purging"
This reverts commit 16c5abd1cd.
2025-10-06 10:59:43 -04:00
Slobodan Predolac
6cc6a4ce51 Revert "Remove an unused function and global variable"
This reverts commit acd85e5359.
2025-10-06 10:59:43 -04:00
guangli-dai
b725d6b1d6 Remove Travis Windows CI for now since it has infra failures. 2025-09-17 17:29:38 -07:00
Slobodan Predolac
dde70db2dc [sdt] Add some tracepoints to sec and hpa modules 2025-09-16 16:27:04 -07:00
Carl Shapiro
d0287ffda4 Improve the portability of grep patterns in configure.ac
The configure.ac script uses backslash plus in its grep patterns to
match one or more occurrences.  This is a GNU grep extension to the
Basic Regular Expressions syntax that fails on systems with a more
traditional grep.  This changes fixes grep patterns that use backslash
plus to use a star instead.

Closes: #2777
2025-09-16 14:35:51 -07:00
guangli-dai
aae98fbb64 Add a page-allocator microbenchmark. 2025-09-16 10:15:04 -04:00
guangli-dai
61addd16f6 Adding trace analysis in preparation for page allocator microbenchmark. 2025-09-16 10:15:04 -04:00
Carl Shapiro
470d0d9397 Replace an instance of indentation with spaces with tabs 2025-09-12 10:31:54 -07:00
Aurélien Brooke
1e65c25554 Add missing thread_event_registry.c to Visual Studio projects
This file was added by b2a35a905f.
2025-09-08 11:52:34 -07:00
lexprfuncall
62acef3534 Update config.guess and config.sub to the latest versions
These files need to be refreshed periodically to support new platform
types.

The following command was used to retrieve the updates

curl -L -O https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
curl -L -O https://git.savannah.gnu.org/cgit/config.git/plain/config.sub

Closes: #2814
2025-08-29 16:25:02 -07:00
Carl Shapiro
ed426d4c0e Always use pthread_equal to compare thread IDs
This change replaces direct comparisons of Pthread thread IDs with
calls to pthread_equal.  Directly comparing thread IDs is neither
portable nor reliable since a thread ID is defined as an opaque type
that can be implemented using a structure.
2025-08-28 14:45:51 -07:00
Slobodan Predolac
101513b526 Remove pidfd_open call handling and rely on PIDFD_SELF 2025-08-27 12:44:45 -04:00
lexprfuncall
6790c57953 Change the default page size to 64KiB on Aarch64 Linux
This updates the configuration script to set the default page size to
64KiB on Aarch64 Linux.  This is motivated by compatibility as a build
configured for a 64KiB page will work on kernels that use the smaller
4KiB or 16KiB pages, whereas the reverse is not true.

To make the configured page size setting more visible, the script now
displays the page size when printing the configuration results.

Users that want to override the page size in to choose a smaller value
can still do so with the --with-lg-pagesize configuration option.
2025-08-26 18:10:05 -07:00
Slobodan Predolac
458db0ea28 [EASY][BUGFIX] Spelling and format 2025-08-23 21:47:21 -07:00
lexprfuncall
f4b86c4cca Define malloc_{write,read}_fd as non-inline global functions
The static inline definition made more sense when these functions just
dispatched to a syscall wrapper.  Since they acquired a retry loop, a
non-inline definition makes more sense.
2025-08-23 11:42:23 -04:00
lexprfuncall
405661052f Handle interruptions and retries of read(2) and write(2) 2025-08-23 11:42:23 -04:00
lexprfuncall
9dd4e1e482 Remove an orphaned comment
This was left behind when definitions of malloc_open and malloc_close
were abstracted from code that had followed.
2025-08-23 11:42:23 -04:00
Shirui Cheng
f7232fc1de Revert PR #2608: Manually revert commits 70c94d..f9c0b5
Closes: #2707
2025-08-22 21:55:24 -07:00
lexprfuncall
755913a3d3 Fix the compilation check for process madvise
An include of unistd.h is needed to make the declaration of the
syscall function visible to the compiler.  The include of sys/mman.h
is not used at all.
2025-08-21 22:43:02 -07:00
Slobodan Predolac
a815804590 Save and restore errno when calling process_madvise 2025-08-21 16:22:06 -07:00
lexprfuncall
3a7ece7226 Remove an unused function and global variable
When the dehugify functionality was retired in an previous commit, a
dehugify-related function and global variable in a test was
accidentally left in-place causing builds that add -Werror to CFLAGS
to fail.
2025-08-21 08:59:37 -07:00
Slobodan Predolac
c4844e9613 Experimental configuration option for fast path prefetch from cache_bin 2025-08-15 16:06:08 -07:00
lexprfuncall
fb2cba5926 Use relaxed atomics to access the process madvise pid fd
Relaxed atomics already provide sequentially consistent access to single
location data structures.
2025-08-13 18:33:27 -07:00
lexprfuncall
e98a99db06 Do not dehugify when purging
Giving the advice MADV_DONTNEED to a range of virtual memory backed by
a transparent huge page already causes that range of virtual memory to
become backed by regular pages.
2025-08-13 18:31:50 -07:00
lexprfuncall
4af7197ae6 Fix several spelling errors in comments 2025-08-08 14:12:12 -07:00
Slobodan Predolac
2c655f83fc [process_madvise] Make init lazy so that python tests pass. Reset the pidfd on fork 2025-07-29 15:47:53 -07:00
Slobodan Predolac
1f517e6bad Add several USDT probes for hpa 2025-06-26 13:16:04 -07:00
Slobodan Predolac
320e83681a Add experimental support for usdt systemtap probes 2025-06-26 13:16:04 -07:00
guangli-dai
fe04b2dc54 Ignore the clang-format changes in the git blame. 2025-06-22 09:21:44 -07:00
guangli-dai
f1bba4a87c Reformat the codebase with the clang-format 18. 2025-06-20 14:35:15 -07:00
Shirui Cheng
0a6215c171 Update the default value for opt_experimental_tcache_gc and opt_calloc_madvise_threshold 2025-06-17 13:25:20 -07:00
Guangli Dai
3026bea876 Remove --enable-limit-usize-gap for cirrus CI since the config-time option is removed. 2025-06-16 11:16:40 -07:00
guangli-dai
4d6b5f3f56 Update appveyor settings. 2025-06-16 11:16:40 -07:00
dzhao.ampere
188e62424a test/unit/psset.c: fix SIGSEGV when PAGESIZE is large
When hugepage is enabled and PAGESIZE is large, the test could
ask for a stack size larger than user limit. Allocating the
memory instead can avoid the failure.

Closes: #2408
2025-06-13 17:08:38 -07:00
Slobodan Predolac
390e70c840 [thread_event] Add support for user events in thread events when stats are enabled 2025-06-11 15:37:03 -07:00
Slobodan Predolac
b2a35a905f [thread_event] Remove macros from thread_event and replace with dynamic event objects 2025-06-11 15:37:03 -07:00
Qi Wang
1972241cd2 Remove unused options in the batched madvise unit tests. 2025-06-02 11:25:37 -07:00
Jason Evans
27d7960cf9 Revert "Extend purging algorithm with peak demand tracking"
This reverts commit ad108d50f1.
2025-06-02 10:44:37 -07:00
guangli-dai
edaab8b3ad Turn clang-format off for codes with multi-line commands in macros 2025-05-28 19:22:21 -07:00
guangli-dai
4531411abe Modify .clang-format to have declarations aligned 2025-05-28 19:22:21 -07:00
guangli-dai
1818170c8d Fix binshard.sh by specifying bin_shards for all sizes. 2025-05-28 19:21:49 -07:00
guangli-dai
fd60645260 Add one more check to double free validation. 2025-05-28 19:21:49 -07:00
Xin Yang
5e460bfea2 Refactor: use the cache_bin_sz_t typedef instead of direct uint16_t
any future changes to the underlying data type for bin sizes
(such as upgrading from `uint16_t` to `uint32_t`) can be achieved
by modifying only the `cache_bin_sz_t` definition.

Signed-off-by: Xin Yang <yangxin.dev@bytedance.com>
2025-05-22 10:43:33 -07:00