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 ...
随机推荐
- md5加密utils
package cn.itcast.bos.utils; import java.math.BigInteger; import java.security.MessageDigest; impo ...
- Python:re中的group方法简介
原文地址:http://www.cnblogs.com/kaituorensheng/archive/2012/08/20/2648209.html. 正则表达式中,group()用来提出分组截获的字 ...
- cycle标签和random两种方式美化表格
一:cycle标签实现给表格变色 1. <style>标签里写好需要的颜色 2. 在要变色的地方(行/列)加固定的语句,按照顺序依次执行 代码: <!DOCTYPE html> ...
- Json常用序列化工具包大比拼
一.前言 Json已成为计算机编程中最常用的数据传输和存储格式之一,所以对Json的序列化和反序列化工具的选择也是互联网系统中比较重要的环节,尤其在高并发下的执行效率,可能会直接影响系统的吞吐率.本文 ...
- 支付宝 ILLEGAL_SIGN
支付宝 ILLEGAL_SIGN: 解决办法:地址加上 <![CDATA[ ...... ]]> <PAY_COMPLETE_PAGE_URL><![CDATA[http ...
- tensorflow学习笔记1:导出和加载模型
用一个非常简单的例子学习导出和加载模型: 导出 写一个y=a*x+b的运算,然后保存graph: import tensorflow as tf from tensorflow.python.fram ...
- JAVA锁有哪些种类,以及区别(转)
在读很多并发文章中,会提及各种各样锁如公平锁,乐观锁等等,这篇文章介绍各种锁的分类.介绍的内容如下: 公平锁/非公平锁 可重入锁 独享锁/共享锁 互斥锁/读写锁 乐观锁/悲观锁 分段锁 偏向锁/轻量级 ...
- day09-python基础
一.Linux基础 - 计算机以及日后我们开发的程序防止的服务器的简单操作 二.Python开发 a.开发 1.开发语言 高级语言:Python Java.PHP C# Go ruby C++... ...
- vue-cli webpack浅析
一直对脚手架的webpack配置很感兴趣. 长话短说,先从npm start开始. 打开package.json 找到scripts 可以看到start 运行的是dev, dev 又是从 build/ ...
- Navicat Premium for Mac完美破解
前因:系统升级Mojave10.14.4,没升级成功,也可能是误删了系统下的private文件夹下的东西,导致内核崩溃. 自己鼓捣了下,恢复系统不成功,去苹果售后问了下,重装系统399,保留资料 ...