Linux NFS slow startup problem Boot acceleration Redhat change computer name Embedded linu

  
 

Linux NFS startup slow Redhat when the VMWare virtual machine is started, it stays for a long time when starting the NFS service. The reason and solution are as follows: because each client mounts NFS and does not have normal umount, /var/lib/nfs/rmtab will leave a record, every time NFS is started, it will check the previous IP. If it doesn't work, wait until timeout. Cat rmtab look, a lot of used IP is remembered inside, no wonder slow like a snail! After emptied, I tried it and the speed is getting faster. Linux change computer name
do as the following steps: 1) open a shell, tpye the command below:[root@kcn-110]#hostname kcn-110mw2)edit the file:/etc/sysconfig/network , change the value of 'HOSTNAME':[root@kcn-110]#vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=kcn-110mw3)edit the file:/etc/hosts, change the ip address and your hostname[root@ Kcn-110]#vi /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.#127.0.0.1 localhost.localdomain localhost192.168.0.110 kcn-110mw kcn-110mw Linux driver read and write IO port
In Arm, Linux, all will do phy-> virt mapping. One of the mapping methods is static mapping, and ioremap is dynamic mapping. After static mapping, dynamic mapping can still be done via ioremap, that is, an IO physical address can be mapped to multiple virtual addresses. (1) About IO and memory space: There is a concept of I/O space in X86 processor. I/O space is relative to memory space, which is accessed by specific instructions in and out. The port number identifies the register address of the peripheral. The format of the Intel syntax in and out instructions is: IN accumulator, {port number│DX}OUT {port number│DX}, accumulator Currently, most embedded microcontrollers such as ARM, PowerPC, etc. do not provide I/O Space, but only memory space. Memory space can be accessed directly through addresses and pointers. Variables and other data used in programs and programs are stored in memory space. Even in the X86 processor, although the I /O space is provided, if we design the board by ourselves, the peripherals can still be attached to the memory space only. At this point, the CPU can access the peripheral I/O ports as if it were a memory unit, without the need to set up specialized I/O instructions. Therefore, memory space is a must, and I/O space is optional. (2) inb and outb: In the Linux device driver, you should use the function provided by the Linux kernel to access the port located in the I /O space, these functions include: · read and write byte port (8-bit wide) unsigned inb ( Unsigned port);void outb(unsigned char byte, unsigned port);· read/write word port (16-bit wide) unsigned inw(unsigned port);void outw(unsigned short word, unsigned port);· Port (32-bit wide) unsigned inl (unsigned port); void outl (unsigned longword, unsigned port); · read and write a string of bytes insb (unsigned port, void *addr, unsigned long count); void outsb (unsigned Port, void *addr, unsigned long count);· insb() reads the count byte port from the port port and writes the result to the memory pointed to by addr; outsb() counts the memory pointed to by addr The bytes are continuously written to the port where the port starts. · read and write a string of words void insw (unsigned port, void *addr, unsigned long count); void outsw (unsigned port, void *addr, unsigned long count); · read and write a long string of void insl (unsigned port , void *addr, unsigned long count);void outsl(unsigned port, void *addr, unsigned long count); the type of I/O port number port in each of the above functions is highly dependent on the specific hardware platform, therefore, just write out Unsigned. (3) readb and writeb: After the physical address of the device is mapped to the virtual address, although the address can be accessed directly through the pointer, the engineer should use the following set of functions of the Linux kernel to read and write the virtual address of the device memory map. These functions include: · read I/O memory unsigned int ioread8(void *addr); unsigned int ioread16(void *addr); unsigned int ioread32(void *addr); the earlier version of the function corresponding to the above function is (These functions are still supported in Linux 2.6): unsigned readb(address);unsigned readw(address);unsigned readl(address);· Write I/O memory void iowrite8(u8 value, void *addr);void iowrite16 (u16 value, void *addr);void iowrite32(u32 value, void *addr); The earlier version of the function corresponding to the above function is (these functions are still supported in Linux 2.6): void writeb(unsigned value, address );void writew(unsigned value, address);void writel(unsigned value, address);

Copyright © Windows knowledge All Rights Reserved