LinuxÏÂÈçºÎ°ÑIO¿Õ¼äÓ³Éäµ½Óû§½ø³Ì¿Õ¼ä£¿
ÆäʵÊǸöÂù¼òµ¥µÄÎÊÌâ¡£ÔÚLDD3µÄµÚ15ÕÂÉÏÓÐд£¨¼û“Remapping Specific I/O Regions”ÕâÒ»½Ú£©¡£²»¹ýµ±Ê±×÷ÕßÑ¡ÔñÁËÒ»¸ö´íÎóµÄ×ö·¨£ºÏÈ°ÑÕâ¿éIO¿Õ¼äÓÃioremapÓ³Éäµ½ÁËÄں˿ռ䣬ȻºóÔÚÓû§½ø³Ì·ÃÎʱ»Ó³ÉäµÄµØÖ·Ëù²ú ÉúµÄȱҳÖжÏÀÓÃvmalloc_to_pageµÃµ½page£¬·µ»Ø¸øÓû§½ø³Ì¡£
È»¶ø£¬vmalloc_to_pageû·¨ÓÃÔÚioremapËùµÃµ½µÄµØÖ·ÉÏ£¬ÒòΪIO¿Õ¼ä¸ù±¾¾ÍûÓжÔÓ¦µÄPage½á¹¹£¬·µ»ØµÄpageÖ¸Õë×ÔÈ»ÊDz»¶ÔµÄ¡£
ÕýÈ·µÄ×ö·¨ÊÇÔÚmmapº¯ÊýÀʹÓÃremap_pfn_rangeº¯Êý¡£´úÂëÈçÏ¡£×¢ÒâÒªÉèÖÃÒ»ÏÂvma->vm_pgoffΪÄãÒªmapµÄio¿Õ¼äµÄÎïÀíµØÖ·¶ÔÓ¦µÄÒ³¡£
static int filter_mmap(struct file *filp, struct vm_area_struct *vma)
{
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
vma->vm_pgoff = ( (u32)map_start >> PAGE_SHIFT);
if (remap_pfn_range(vma,
vma->vm_start,
vma->vm_pgoff,
vma->vm_end-vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;
return 0;
}
Ïà¹ØÎĵµ£º
ÓÃSSHµÇ½Զ³ÌµÄlinux·þÎñÆ÷»òÓÃwinä¯ÀÀÔËÐÐsambaµÄlinux·þÎñÆ÷ÖÐÓÐÖÐÎÄÃûµÄÎļþ¼ÐµÄʱºò£¬¿´µ½ÀïÃæµÄÖÐÎÄÎļþÃû¶¼ÊÇÂÒÂ룬±à¼ÎĵµµÄʱºò¶¼ÊÇ´®Ðеģ¬Ã¿´ÎÒªexport LANG=enÂé·³ËÀÁË¡£
ÉÏÍøËÄ´¦ËÑË÷£¬Çó½Ì¸ßÈË£¬µÃ´Ë°ì·¨¡£
(1) ´ò¿ª/etc/sysconfig/i18n
ÉèÖÃΪ£º
LANG="zh_CN.GB2312"
LANGUAGE="zh_CN.GB18030:zh_CN ......
VMwareÖеÄRedHat Eneterprise
Linux 5ϵͳʱ¼ä×ܱÈÖ÷»úµÄWindows XPÂý¡£¼´Ê¹ÓÃdateÃüÁîÉèÖÃLinuxʱ¼äÓëWindows XPʱ¼äÒ»Ö£¬LinuxµÄʱ¼äÈÔ»áÖð½¥µÄÂýÏÂÀ´¡£ÕâÊǺÜÍ·Í´µÄÎÊÌ⣬Èç¹û²»Äܽâ¾ö£¬µ±ÔÚÁ½¸öϵͳ¼ä½»»»Îļþʱ£¬¿ÉÄܻᵼÖ±àÒë³öÏÖÒì³£¡£µçÄÔËùʹÓõÄCPUÊÇIntel Core2 Duo T7250£¬Ö÷Ƶ2.0G£»¶ø ......
½Ó´¥linuxʱ¼ä»¹²»ÊǺܳ¤,ºÜ¶àÃüÁî¼Ç²»×¡,ºÇºÇ,Äõ½Ð·þÎñÆ÷¿´ÏÂÓ²ÅÌ·ÖÇø $df –lh Îļþϵͳ ÈÝÁ¿ ÒÑÓà ¿ÉÓà ÒÑÓÃ% ¹ÒÔصã
/dev/sda1 2.0G ......
Õâ´Îתµ½Á˺½¿ÕµÄÒ»¸öÏîÄ¿£¬ÐèÒªÔÚLinuxÏÂÓÃC×ö¿ª·¢¡£°æ±¾¹ÜÀí²ÉÓÃSVN£¬´Ó×òÌìÏÂÎ翪ʼÎҾͿªÊ¼ÁË°²×°£¬ÕæµÄÊÇÍ´¿àµÄ¹ý³Ì¡£ÏÖÔÚµ¹ÊÇ°²×°ºÃÁË£¬µ«ÊÇÅäÖÃÃüÁûÓÐÕÆÎÕ¡£
Èç¹ûÓÐȨÏÞ´ÓÍøÉÏÖ±½Ó¸üÐÂÈí¼þ£¬ÎÒ²»±Øÿ´Î¶¼È¥ÕÒÔ´Âë°ü£¬È ......
Õâ¸öÊÇÎÒÔÚÒ»±¾ÊéÉÏ¿´µ½µÄ£¬ÆäÖеÄһЩ´úÂëÎÒÓÐËù¸Ä±ä£¬Ð´¸ø¸÷λºÃÓѹ²Ïíһϣ¡
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h&g ......