Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AUTO_HUGEPAGE feature to disable writing to nr_hugepages #2391

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Spudz76
Copy link
Contributor

@Spudz76 Spudz76 commented May 18, 2021

Sometimes there is need to set/limit hugepages to a smaller amount (up to for example 40 which covers most algos) but do not want the full RandomX allocation (not enough memory, other activities require slack space, only running one of 12 cores anyway so who cares about the speedup for a single-thread calm side mining, etc). But when running as root for MSR access or other reasons the automatic reservation grabs more hugepages.

This adds a compile-time feature to disable writing to nr_hugepages, so that the described use-case works nicely (reserve your own or suffer perhaps intentionally without enough, like older versions). Compile-time was easier to wire and as a power user feature it didn't seem like adding to main config made any sense. It can be converted to an argument/config item later if it appears to be a useful medium-power-user (power-noob?) feature. Also I didn't feel like wiring all that and adding it to docs lol.

Note the default is ON which means be the same as it has been (yes, do autoreserve) and intentionally setting it OFF causes no-writing mode (like old versions).

@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 5 times, most recently from e4e4eac to b05da46 Compare September 22, 2021 15:40
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 0dd0186 to cd21f48 Compare October 5, 2021 19:52
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from fabdb50 to fe60f37 Compare October 13, 2021 01:07
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 278231b to e678d7f Compare October 25, 2021 21:57
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from ca17ec5 to 0659178 Compare November 2, 2021 12:21
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 7 times, most recently from 64228f0 to 5b03bfa Compare December 3, 2021 19:27
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 9188cb3 to 4253090 Compare December 19, 2021 18:12
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 3 times, most recently from a614c95 to c768d9b Compare February 5, 2022 10:29
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from be8dc5b to 2a6ba53 Compare April 20, 2022 15:02
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 77d1cdc to af4ff8e Compare May 21, 2022 11:43
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from b118440 to 604ba06 Compare June 28, 2022 04:12
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 4217905 to 640038d Compare August 26, 2022 00:20
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 4 times, most recently from 531e709 to 5472f59 Compare September 22, 2022 03:35
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from a561096 to 4354069 Compare October 1, 2022 17:35
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from ca85f20 to 58b825c Compare October 24, 2022 12:04
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from dcf463f to 46976f2 Compare March 7, 2023 21:42
@Spudz76 Spudz76 force-pushed the dev-featureAutoHugepage branch 2 times, most recently from 082cdf0 to 50ecab3 Compare May 23, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant