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 ...
随机推荐
- 获取上一行记录lag
SELECT EMPLID ,EFFDT ,END_DT ,COMPANY ,DEPTID ,POSITION_NBR ,' ' ,' ' FROM ( SELECT J1.EMPLID ,J1.EF ...
- 【stm32开发之HAL采坑记之:001使用ST-LINK下载出错问题】
使用ST-LINK下载出错问题 开发环境:swstm32+stm32cubeMx+硬石F1开发板 联系方式:yexiaopeng1992@126.com 出现问题:在使用ST-linik下载时发现,在 ...
- 【转】jenkins+gitlab配置遇到问题
搭建jenkins+gitlab拉取代码失败,日志如下: ERROR: Error fetching remote repo 'origin'hudson.plugins.git.GitExcepti ...
- jdk5升级至jdk8框架版本选型
spring-framework-4.3.18.RELEASE 4.3.x+:JDK8 Spring JDK Version Range Spring Framework 5.1.x: JDK 8- ...
- Javascript基础语法(二)
三.运算符 1. 算术运算符 + - * / % ++ -- 1.1赋值运算符 = += . -= .*=. /= 1 +=2; ==> 1 = 1 + 2; 2. 比较运算符 > ...
- Go语言文件操作
打开和关闭文件 os.Open()函数能够打开一个文件,返回一个*File和一个err. file.close()方法能够关闭文件. //打开和关闭文件 func main() { file,err ...
- post请求中body数据类型
1.application/json:json格式,如下: {"input1":"xxx","input2":"ooo" ...
- C#匿名类型和动态解析减少定义传输类模板
C#作为强类型语言,在序列化和反序列化(json)场景中对字符串解析常常需要定义强类型模板,造成编码上的繁琐.其实可以使用匿名类型和动态解析减少json序列化时候的数据模板定义: string a = ...
- PL/SQL变量的作用域和可见性
变量的作用域和可见性设计变量在块中的位置,不同的位置使得变量具有不同的有效性与可访问性. 变量的作用域是指可以使用变量的程序单元部分,可以是包和子程序包等. 当一个变量在它的作用域中可以用一个不限定的 ...
- 算法(第四版)C# 习题题解——2.1
写在前面 整个项目都托管在了 Github 上:https://github.com/ikesnowy/Algorithms-4th-Edition-in-Csharp 这一节内容可能会用到的库文件有 ...