1GB pages can only be allocated at boot time using hugepages= and not freed afterwards
2018-6-27 9:12:38
https://stackoverflow.com/questions/26385554/error-setting-nr-hugepages-via-sysfs
~ # echo 1 > /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
sh: write error: Invalid argument
parameter in https://www.kernel.org/doc/Documentation/kernel-parameters.txt
says that "1GB pages can only be allocated at boot time using hugepages= and not freed afterwards"
I think this is why I can't decrease number of pages.
Also, the code in mm/hugetlb.c doesn't allow this operation:
#if defined(CONFIG_CMA) && defined(CONFIG_X86_64)
...
static inline bool gigantic_page_supported(void) { return true; }
#else
static inline bool gigantic_page_supported(void) { return false; }
...
#endif
...
static int hugetlb_sysctl_handler_common(...)
{
...
if (write && hstate_is_gigantic(h) && !gigantic_page_supported())
return -EINVAL;
...
}
So, unless CONFIG_CMA is defined (and in the default kernel configuration shipped with Fedora 20
this option is disabled), the kernel will always return EINVAL.
1GB pages can only be allocated at boot time using hugepages= and not freed afterwards的更多相关文章
- grub paramiter & menu.list
在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB ...
- linux内核可以接受的参数 | Linux kernel启动参数 | 通过grub给内核传递参数
在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB ...
- Linux传统Huge Pages与Transparent Huge Pages再次学习总结
Linux下的大页分为两种类型:标准大页(Huge Pages)和透明大页(Transparent Huge Pages).Huge Pages有时候也翻译成大页/标准大页/传统大页,它们都是Hu ...
- Examining Huge Pages or Transparent Huge Pages performance
Posted by William Cohen on March 10, 2014 All modern processors use page-based mechanisms to transla ...
- spring boot 开静态资源访问,配置视图解析器
配置视图解析器spring.mvc.view.prefix=/pages/spring.mvc.view.suffiix= spring boot 开静态资源访问application.proerti ...
- kernel feature collection
Fault injection http://lwn.net/Articles/209257/ The framework can cause memory allocation failures a ...
- linux hugepage
The intent of this file is to give a brief summary of hugetlbpage support inthe Linux kernel. This ...
- 戴文的Linux内核专题:08内核配置(4)
转自Linux中国 这个第四部分里,我们将继续配置更多的设置和特性. 这里我们被问及关于"IBM Calgary IOMMU support (CALGARY_IOMMU)".这个 ...
- [自制操作系统] 连续页分配释放&kmalloc/kfree
本文将在JOS上实现连续内存.释放,提供内核的kmalloc与kfree,并在分配frambuffer的时候进行测试. Github : https://github.com/He11oLiu/JOS ...
随机推荐
- (.NET高级课程笔记)反射总结
反射总结 1.dll-IL-matadata-反射 2.反射加载dll,获取module.类.方法.特性 3.反射创建对象:反射+简单工厂+配置文件 4.反射调用实例方法.静态方法.重载方法.私有方法 ...
- 打包工具webpack安装·Mac
最近在学Vue.js,是我接触的第一个前端框架.本来感觉还不错,各种惊叹于它可以用很少的代码写出那种具备交互能力的神奇模块. 在学的过程中总是能碰到一个叫webpack的单词,查过,是一个模块打包器, ...
- PHP 以最快的方式判断字符串是否以某给定字符串开始
好久没搞代码了,最近找工作,重操旧业,在整理以前写的框架的时候发现,之前的自动加载部分执行速度上还是有可优化空间的,就是如果类名是以 risen\ 开始的(我的框架中的类都在此命名空间下),那么可直接 ...
- node多人聊天室搭建
1.采用websocket: 为什么不用ajax的http:在用HTTP发送消息时,必须用一个新的TCP/IP连接.打开和关闭连接需要时间.此 外,因为每次请求都要发送HTTP头,所以传输的数据量也比 ...
- 网络库压力测试:mongols VS evpp
evpp是360出品的一个网络库,基于libevent,进行了许多改造,对c++11友好.据称比libevent性能要好. 到底有多好呢?360开发人员有自己的测试,信不信由你. evpp源码下有个h ...
- 洛谷 K短路(魔法猪学院)
A*+迪杰特斯拉... 第十一个点卡爆 不管了 #include<iostream> #include<algorithm> #include<cstring> # ...
- HTTP笔记1
传输层:提供进程地址 TCP:传输控制协议,面向连接的协议:通信前需要建立虚拟链路:结束后拆除链路.端口号:0-65535 UDP:用户报文协议,无连接的协议.端口号:0-65535 IANA(互联网 ...
- ansible-2.1.0.0_module
ansible --version ansible 2.1.0.0 config file = /home/onest/luoliyu/ceph-ansible/ansible.cfg configu ...
- 三分钟了解Go语言的前世今生
一. 为什么需要一个新的语言最近十年来,C/C++在计算领域没有很好得到发展,并没有新的系统编程语言出现.对开发程度和系统效率在很多情况下不能兼得.要么执行效率高,但低效的开发和编译,如C++:要么执 ...
- angular2 ----字符串、对象、base64 之间的转换
1. JSON对象转化为字符串 let obj = { "name":Ayinger; "sex":"女"; } let str = JSO ...