亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hugetlbpage.txt

?? Linux Kernel 2.6.9 for OMAP1710
?? TXT
字號:
The intent of this file is to give a brief summary of hugetlbpage support inthe Linux kernel.  This support is built on top of multiple page size supportthat is provided by most of modern architectures.  For example, IA-32architecture supports 4K and 4M (2M in PAE mode) page sizes, IA-64architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,256M.  A TLB is a cache of virtual-to-physical translations.  Typically thisis a very scarce resource on processor.  Operating systems try to make bestuse of limited number of TLB resources.  This optimization is more criticalnow as bigger and bigger physical memories (several GBs) are more readilyavailable.Users can use the huge page support in Linux kernel by either using the mmapsystem call or standard SYSv shared memory system calls (shmget, shmat).First the Linux kernel needs to be built with CONFIG_HUGETLB_PAGE (presentunder Processor types and feature)  and CONFIG_HUGETLBFS (present under filesystem option on config menu) config options.The kernel built with hugepage support should show the number of configuredhugepages in the system by running the "cat /proc/meminfo" command.  /proc/meminfo also provides information about the total number of hugetlbpages configured in the kernel.  It also displays information about thenumber of free hugetlb pages at any time.  It also displays information aboutthe configured hugepage size - this is needed for generating the properalignment and size of the arguments to the above system calls.The output of "cat /proc/meminfo" will have output like:.....HugePages_Total: xxxHugePages_Free:  yyyHugepagesize:    zzz KB/proc/filesystems should also show a filesystem of type "hugetlbfs" configuredin the kernel./proc/sys/vm/nr_hugepages indicates the current number of configured hugetlbpages in the kernel.  Super user can dynamically request more (or free somepre-configured) hugepages. The allocation( or deallocation) of hugetlb pages is posible only if there areenough physically contiguous free pages in system (freeing of hugepages ispossible only if there are enough hugetlb pages free that can be transfered back to regular memory pool).Pages that are used as hugetlb pages are reserved inside the kernel and cannot be used for other purposes. Once the kernel with Hugetlb page support is built and running, a user canuse either the mmap system call or shared memory system calls to start usingthe huge pages.  It is required that the system administrator preallocateenough memory for huge page purposes.  Use the following command to dynamically allocate/deallocate hugepages:	echo 20 > /proc/sys/vm/nr_hugepagesThis command will try to configure 20 hugepages in the system.  The successor failure of allocation depends on the amount of physically contiguousmemory that is preset in system at this time.  System administrators may wantto put this command in one of the local rc init file.  This will enable thekernel to request huge pages early in the boot process (when the possibilityof getting physical contiguous pages is still very high).If the user applications are going to request hugepages using mmap systemcall, then it is required that system administrator mount a file system oftype hugetlbfs:	mount none /mnt/huge -t hugetlbfs <uid=value> <gid=value> <mode=value>		 <size=value> <nr_inodes=value>This command mounts a (pseudo) filesystem of type hugetlbfs on the directory/mnt/huge.  Any files created on /mnt/huge uses hugepages.  The uid and gidoptions sets the owner and group of the root of the file system.  By defaultthe uid and gid of the current process are taken.  The mode option sets themode of root of file system to value & 0777.  This value is given in octal.By default the value 0755 is picked. The size option sets the maximum value ofmemory (huge pages) allowed for that filesystem (/mnt/huge). The size isrounded down to HPAGE_SIZE.  The option nr_inode sets the maximum number ofinodes that /mnt/huge can use.  If the size or nr_inode options are notprovided on command line then no limits are set.  For size and nr_inodesoptions, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For example, size=2K has the same meaning as size=2048. An example is given at the end of this document. read and write system calls are not supported on files that reside on hugetlbfile systems.A regular chown, chgrp and chmod commands (with right permissions) could beused to change the file attributes on hugetlbfs.Also, it is important to note that no such mount command is required if theapplications are going to use only shmat/shmget system calls.  Users whowish to use hugetlb page via shared memory segment should be a member ofa supplementary group and system admin needs to configure that gid into/proc/sys/vm/hugetlb_shm_group.  It is possible for same or differentapplications to use any combination of mmaps and shm* calls.  Though themount of filesystem will be required for using mmaps./* Example of using hugepage in user application using Sys V shared memory * system calls.  In this example, app is requesting memory of size 256MB that * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget * system call to informt the kernel that it is requesting hugepages.  For * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages. * That means the addresses starting with 0x800000....will need to be * specified. */#include <sys/types.h>#include <sys/shm.h>#include <sys/types.h>#include <sys/mman.h>#include <errno.h>extern int errno;#define SHM_HUGETLB 04000#define LPAGE_SIZE      (256UL*1024UL*1024UL)#define         dprintf(x)  printf(x)#define ADDR (0x8000000000000000UL)main(){        int shmid;        int     i, j, k;        volatile        char    *shmaddr;        if ((shmid =shmget(2, LPAGE_SIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W ))< 0) {                perror("Failure:");                exit(1);        }        printf("shmid: 0x%x\n", shmid);        shmaddr = shmat(shmid, (void *)ADDR, SHM_RND) ;        if (errno != 0) {                perror("Shared Memory Attach Failure:");                exit(2);        }        printf("shmaddr: %p\n", shmaddr);        dprintf("Starting the writes:\n");        for (i=0;i<LPAGE_SIZE;i++) {                shmaddr[i] = (char) (i);                if (!(i%(1024*1024))) dprintf(".");        }        dprintf("\n");        dprintf("Starting the Check...");        for (i=0; i<LPAGE_SIZE;i++)                if (shmaddr[i] != (char)i)                        printf("\nIndex %d mismatched.");        dprintf("Done.\n");        if (shmdt((const void *)shmaddr) != 0) {                perror("Detached Failure:");                exit (3);        }}**************************************************************************************************************************************/* Example of using hugepage in user application using mmap  * system call.  Before running this application, make sure that * administrator has mounted the hugetlbfs (on some directory like /mnt) using * the command mount -t hugetlbfs nodev /mnt * In this example, app is requesting memory of size 256MB that * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget * system call to informt the kernel that it is requesting hugepages.  For * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages. * That means the addresses starting with 0x800000....will need to be * specified. */#include <unistd.h>#include <stdio.h>#include <sys/mman.h>#include <fcntl.h>#include <errno.h>#define FILE_NAME "/mnt/hugepagefile"#define LENGTH (256*1024*1024)#define PROTECTION (PROT_READ | PROT_WRITE)#define FLAGS   MAP_SHARED |MAP_FIXED#define ADDRESS (char *)(0x60000000UL + 0x8000000000000000UL)extern errno;check_bytes(char *addr){        printf("First hex is %x\n", *((unsigned int *)addr));}write_bytes(char *addr){        int i;        for (i=0;i<LENGTH;i++)                *(addr+i)=(char)i;}read_bytes(char *addr){        int i;        check_bytes(addr);        for (i=0;i<LENGTH;i++)                if (*(addr+i)!=(char)i) {                        printf("Mismatch at %d\n", i);                        break;                }}main(){        unsigned long addr = 0;        int fd ;        fd = open(FILE_NAME, O_CREAT|O_RDWR, 0755);        if (fd < 0) {                perror("Open failed");                exit(errno);        }        addr = (unsigned long)mmap(ADDRESS, LENGTH, PROTECTION, FLAGS, fd, 0);        if (errno != 0)                perror("mmap failed");        printf("Returned address is %p\n", addr);        check_bytes((char*)addr);        write_bytes((char*)addr);        read_bytes((char *)addr);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品影视| 麻豆精品一二三| 国产日韩成人精品| 精品日韩99亚洲| 精品国产a毛片| 久久这里只有精品6| 精品国产不卡一区二区三区| 日韩欧美专区在线| 欧美一级高清片| 欧美va天堂va视频va在线| 欧美不卡一区二区三区| 精品福利一二区| 国产亚洲精久久久久久| 亚洲国产精品黑人久久久| 国产精品素人视频| 亚洲欧美日韩一区二区 | 国产人妖乱国产精品人妖| 欧美成人女星排行榜| 久久久亚洲午夜电影| 国产精品久久久久久久久搜平片| 国产精品美女久久久久久久久| 国产精品沙发午睡系列990531| ...中文天堂在线一区| 亚洲欧美另类在线| 日韩av电影一区| 国产伦精品一区二区三区视频青涩| 国产精品中文字幕日韩精品| 不卡av电影在线播放| 91久久国产综合久久| 欧美精品国产精品| 中文字幕免费在线观看视频一区| 亚洲三级在线观看| 免费欧美在线视频| 成人性视频网站| 欧美日韩国产高清一区二区三区 | 国产精品色婷婷久久58| 伊人开心综合网| 激情文学综合丁香| 日本大香伊一区二区三区| 欧美一区二区成人| 国产精品成人一区二区艾草| 亚洲电影欧美电影有声小说| 国产精品一区二区免费不卡| 欧美日韩大陆在线| 欧美韩日一区二区三区四区| 日韩精品国产精品| 91免费观看视频| 久久久精品影视| 亚洲不卡一区二区三区| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 热久久国产精品| aa级大片欧美| 久久久99久久| av激情成人网| 7777精品伊人久久久大香线蕉的 | av在线播放一区二区三区| 91精品国产免费久久综合| 一区二区中文视频| 国产v综合v亚洲欧| 日韩欧美不卡在线观看视频| 亚洲综合色视频| 99久久国产综合精品色伊| 2022国产精品视频| 日本成人在线视频网站| 在线观看亚洲精品| 日韩伦理电影网| 成人一区二区三区视频| 欧美成人女星排名| 美女尤物国产一区| 日韩精品一区二区三区视频| 一区二区三区欧美| bt欧美亚洲午夜电影天堂| 久久精品人人爽人人爽| 麻豆免费看一区二区三区| 欧美日韩三级在线| 午夜欧美在线一二页| 欧美四级电影网| 亚洲第一主播视频| 欧美日韩精品一区二区三区| 亚洲一区二区三区激情| 欧洲国产伦久久久久久久| 一区二区三区四区亚洲| 91亚洲精品久久久蜜桃| 亚洲欧美日韩人成在线播放| 97精品久久久午夜一区二区三区 | 欧美大度的电影原声| 免费av成人在线| 欧美大胆人体bbbb| 国产一区二区三区免费在线观看| 日韩视频免费直播| 国产成人av资源| 亚洲精品中文在线影院| 在线观看亚洲精品视频| 日韩成人伦理电影在线观看| 日韩一区二区中文字幕| 国产精品1区2区| 国产精品白丝在线| 精品污污网站免费看| 麻豆国产91在线播放| 国产女人18水真多18精品一级做| av一二三不卡影片| 丝袜美腿一区二区三区| 久久久久久久一区| 91麻豆福利精品推荐| 婷婷久久综合九色国产成人| 久久综合久久99| 一本到一区二区三区| 美女在线一区二区| 1区2区3区国产精品| 在线播放91灌醉迷j高跟美女 | 成人综合在线视频| 亚洲国产毛片aaaaa无费看| 日韩精品专区在线影院观看| 成人看片黄a免费看在线| 亚洲图片欧美视频| 久久精品欧美日韩| 欧洲国内综合视频| 成人一道本在线| 久久精品国内一区二区三区| 国产精品女人毛片| 日韩视频一区二区三区| 91小视频免费观看| 日本va欧美va精品| 亚洲一级电影视频| 国产精品久99| 精品国产91乱码一区二区三区 | 免费在线观看精品| 亚洲欧美成人一区二区三区| 欧美大胆人体bbbb| 欧美午夜精品免费| 99久久久久免费精品国产| 久久国产免费看| 天堂久久一区二区三区| 亚洲美女屁股眼交| 国产精品视频一区二区三区不卡| 欧美一级午夜免费电影| 日本高清成人免费播放| 成人精品国产免费网站| 久久99国产精品免费网站| 亚洲va韩国va欧美va精品| 中文字幕在线观看不卡视频| 26uuu国产日韩综合| 在线综合亚洲欧美在线视频| 欧美亚洲愉拍一区二区| 91伊人久久大香线蕉| av电影天堂一区二区在线| 成人激情综合网站| 成人性视频网站| 粉嫩av一区二区三区在线播放 | 亚洲午夜视频在线观看| 国产精品拍天天在线| 国产女人18毛片水真多成人如厕 | 亚洲丝袜精品丝袜在线| 日本一区二区三区高清不卡| 久久久久久日产精品| 精品国产一区二区三区不卡| 日韩一区二区三区高清免费看看| 欧美色图12p| 欧美亚洲综合网| 欧美日韩一区不卡| 在线不卡的av| 日韩视频123| 久久天堂av综合合色蜜桃网| 久久久精品一品道一区| 国产区在线观看成人精品 | 日韩欧美国产三级电影视频| 欧美日韩成人高清| 欧美精品日韩一区| 欧美哺乳videos| 国产清纯白嫩初高生在线观看91| 国产日韩精品一区二区三区在线| 久久夜色精品一区| 国产亚洲va综合人人澡精品| 国产精品成人免费| 亚洲成人一区二区| 精东粉嫩av免费一区二区三区| 97久久精品人人澡人人爽| 在线一区二区三区四区| 欧美一区二区三区四区视频| 久久久久9999亚洲精品| 中文字幕一区av| 免费精品视频最新在线| 国产成人超碰人人澡人人澡| 欧美性做爰猛烈叫床潮| 久久综合九色综合97婷婷女人| 中文字幕一区二区在线播放| 亚洲一二三四久久| 国产美女一区二区三区| 日本国产一区二区| 精品精品国产高清a毛片牛牛 | 欧美肥胖老妇做爰| 精品久久久久久久久久久久包黑料 | 成人综合日日夜夜| 欧美色区777第一页| 久久奇米777| 午夜精品免费在线| 99国内精品久久| 欧美一区二区大片| 国产精品久久久久久久久免费丝袜| 午夜一区二区三区在线观看|