weixin_39725594
weixin_39725594
2020-11-27 11:49

Using HugePages

It would be nice if we can instruct rpmalloc to use HugePages allocation.

At least on linux it's achieved by mmap-ing files from where the hugetlbfs is mounted. So we should be able to configure rpmalloc with the mount point.

Another possible issue: hugepages on x86 come in size of 2MiB, I don't know how it will interact with the 64KiB alignment used by rpmalloc.

该提问来源于开源项目:mjansson/rpmalloc

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39603217 weixin_39603217 5月前

    Requires #8 in order to handle multiple spans from a single memory mapping

    点赞 评论 复制链接分享
  • weixin_39603217 weixin_39603217 5月前

    Needs to allow page size > span size, set span map count to fill entire page, and to handle unmapping when page size > span size

    点赞 评论 复制链接分享
  • weixin_39603217 weixin_39603217 5月前

    Now available in develop branch if you wanna try it out

    点赞 评论 复制链接分享
  • weixin_39725594 weixin_39725594 5月前

    Great! Thanks, I will try it

    点赞 评论 复制链接分享
  • weixin_39603217 weixin_39603217 5月前

    Note that due to the way rpmalloc operates it cannot gracefully fall back to normal 4k page allocations if it runs out of huge pages, it will fail hard.

    点赞 评论 复制链接分享
  • weixin_39725594 weixin_39725594 5月前

    I think this the better behavior anyway.

    点赞 评论 复制链接分享
  • weixin_39603217 weixin_39603217 5月前

    1.3.1 released, closing this

    点赞 评论 复制链接分享
  • weixin_39603217 weixin_39603217 5月前

    I will look into it

    点赞 评论 复制链接分享

相关推荐