Skip to content

Update jemalloc_internal_defs.h.in for s390x to align with other platforms - #129817

Closed
jonathan-albrecht-ibm wants to merge 1 commit into
ClickHouse:masterfrom
linux-on-ibm-z:s390x-B2-jemalloc-internal-defs
Closed

jonathan-albrecht-ibm wants to merge 1 commit into
ClickHouse:masterfrom
linux-on-ibm-z:s390x-B2-jemalloc-internal-defs

Conversation

@jonathan-albrecht-ibm

@jonathan-albrecht-ibm jonathan-albrecht-ibm commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Update jemalloc_internal_defs.h.in for s390x to align with other platforms

The s390x jemalloc_internal_defs.h.in hasn't been updated in a while and is missing the JEMALLOC_CONFIG_MALLOC_CONF templated value. Some formatting and defaults look different from other platforms for no known reason so update them to match.

Also clean up whitespace.

The values changed to match other platforms are:

/* #undef JEMALLOC_HAVE_SECURE_GETENV */
#define JEMALLOC_PAGEID
#define JEMALLOC_GLIBC_MALLOC_HOOK
#define JEMALLOC_GLIBC_MEMALIGN_HOOK
#define JEMALLOC_CONFIG_MALLOC_CONF "@JEMALLOC_CONFIG_MALLOC_CONF@"
/* #undef JEMALLOC_ENABLE_CXX */

Tested these changes locally on s390x and no issues found.

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...
Update jemalloc_internal_defs.h.in for s390x to align with other platforms


Workflow [PR]
Sync PR [sync-upstream/pr/129817]

@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Nov 6, 2026
@alexey-milovidov alexey-milovidov self-assigned this Nov 7, 2026
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Nov 7, 2026
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Nov 7, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [c2c4703]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel) FAIL
05515_global_subquery_projection_where FAIL cidb
01414_push_predicate_when_contains_with_clause NOT_FAILED cidb
03273_group_by_in_order_still_used_when_group_by_key_doesnt_match_order_by_key NOT_FAILED cidb
Upgrade check (amd_release) ERROR
Unknown job error ERROR cidb
Check failed FAIL cidb

AI Review

Summary

PR #129817 aligns the s390x jemalloc configuration with the other Linux targets, notably applying the shared runtime defaults through JEMALLOC_CONFIG_MALLOC_CONF. No actionable code correctness findings; approve with a changelog nit.

PR Metadata

Improvement is appropriate because the change affects allocator behavior at runtime. A changelog entry is required, but the current entry retains ... and describes an internal header update without explaining the user benefit. Suggested replacement:

Apply the standard jemalloc runtime configuration on s390x, enabling per-CPU arenas and allocation profiling through ClickHouse settings.

Missing context / blind spots
  • ⚠️ Native s390x execution was not independently rerun locally. The author reports successful local testing; native startup and allocation-profiling results would close this verification limit.
Findings

💡 Nits

  • PR description, changelog entry: remove the literal ... and use the user-facing replacement above.
Final Verdict

✅ Approve — no code changes requested. The changelog wording is a minor cleanup.

@clickhouse-gh clickhouse-gh Bot added pr-improvement Pull request with some product improvements submodule changed At least one submodule changed in this PR. labels Nov 7, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing c2c470343 with master 4088c421f (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.

Job report

@clickhouse-gh clickhouse-gh Bot added the external Author is not a member of the ClickHouse organization label Nov 7, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Superseded by #130053, which keeps your commit unchanged and adds a merge of the current master. That merge pulls in the fix for 05515_global_subquery_projection_where (1cfc5bb2e4da); the Upgrade check failure here was a transient GitHub API 504. I could not push the update here because maintainer edits are disabled on the fork. Thank you for the contribution, @jonathan-albrecht-ibm!

alexey-milovidov added a commit that referenced this pull request Nov 9, 2026
…ocator`

#129817 aligned
`contrib/jemalloc-cmake/include_linux_s390x/.../jemalloc_internal_defs.h.in`
with the other platforms: `JEMALLOC_PAGEID` is now defined,
`JEMALLOC_HAVE_SECURE_GETENV` and `JEMALLOC_ENABLE_CXX` are undefined, and
`JEMALLOC_CONFIG_MALLOC_CONF` uses the configured value instead of an empty
string. Mirror this in `base/allocator/Config.h` (`page_id`,
`have_secure_getenv`, `enable_cxx`, `malloc_conf_default`) so the C++
allocator keeps parity with `contrib/jemalloc` on s390x, and update the
comments that mentioned the old s390x behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. external Author is not a member of the ClickHouse organization manual approve Manual approve required to run CI pr-improvement Pull request with some product improvements submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants