Skip to content

Conversation

@hying-caritas
Copy link

THP is disabled in ruby after version 2.6. This will disable THP for job run by ruby too. Enable THP when run job to avoid the issue.

lib/common.rb Outdated
PRCTL = Fiddle::Function.new(
LIBC['prctl'],
[Fiddle::TYPE_INT, Fiddle::TYPE_LONG, Fiddle::TYPE_LONG, Fiddle::TYPE_LONG, Fiddle::TYPE_LONG],
Fiddle::TYPE_INT)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, is it possible to do lazy initialization for these variables? So these are only called when below functions are called for the first time.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

lib/common.rb Outdated
PR_SET_THP_DISABLE = 41
PR_GET_THP_DISABLE = 42

def get_thp_disable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly do a rake rubocop check, which may result in some comments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

THP is disabled in ruby after version 2.6.  This will disable THP for
job run by ruby too.  Enable THP when run job to avoid the issue.

Signed-off-by: Huang Ying <ying.huang@linux.alibaba.com>
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.

2 participants