浮点数(floating-point number)是属于有理数中某特定子集的数的数字表示,在计算机中用以近似表示任意某个实数。具体来说,这个实数由一个整数或定点数(即尾数)乘以某个基数(计算机中通常是2)的整数次幂得到,这种表示方法类似于基数为10的科学记数法。 大部分计算机采用二进制(b=2)的表示方法。位(bit)是衡量浮点数所需存储空间的单位,通常为32位或64位,分别被叫作单精度和双精度。 浮点数精度标准有: IEEE 754 16-bit: Half (binary16) 32-bit: Single (binary32), decimal32 64-bit: Double (binary64), decimal64 128-bit: Quadruple (binary128), decimal128 Extended precision formats 计算机内部表示 Type Sign Exponent Significand field Total bits Exponent bias Bits precision Number of decimal digits Half(IEEE 754-2008) 1 5 10 16 15 11 […]
READ MORE »[转]Linux性能监控及调优资料
对Linux的性能监控及调优,非常全面的材料。 Linux Performance Profiling and Monitoring Linux Performance Tools Linux Performance Analysis and Tools Linux Profiling at Netflix
READ MORE »[转]Linux Performance Analysis New Tools and Old Secrets
非常全面地介绍Linux系统性能监控,包括CPU、内存、硬盘、网络。 官方网站: http://www.brendangregg.com/linuxperf.html 本地下载: Linux Performance Analysis New Tools and Old Secrets
READ MORE »Analysis of write amplification for synchronized write in Linux ext3/ext4 filesystems
Phenomenon: In ext3/ext4 file system, synchronized write performance of 4KB block size is about 50MB /s. However, Huawei ES3000 PCI-E SSD 4K synchronized write performance is almost 220MB /s . There is a performance gap between PCI-E SSD raw device and filesystems on it. Root Cause Analysis : 1. The 4K synchronized write performance […]
READ MORE »Linux ext3/ext4文件系统中同步写放大问题
现象: 客户在ext4文件系统下,以4KB数据块大小同步写性能在47MB/s左右,和PCI-E SSD 4K同步写性能200MB/s有差距。
READ MORE »[转]Linux Kernel and Driver Development Training
Outline Here are the main topics that we cover: Introduction to the Linux kernel Kernel source code Configuring, compiling and booting the kernel Linux kernel modules Memory management and accessing hardware Character device drivers Processes, scheduling, waiting for resources and interrupt management Locking Kernel debugging techniques mmap Using DMA Kernel architecture for device drivers. Illustration […]
READ MORE »RHEL 6系统启动时盘符漂移及解决
在RHEL 6中安装新的SCSI设备后,可能出现盘符漂移情况,如原来系统盘所在的盘符为/dev/sda,加入新设备,重启系统后,盘符变为最后一个,如/dev/ssda。
READ MORE »Linux文件空洞与稀疏文件
本胶片介绍Linux文件空洞及稀疏文件原理,然后分析稀疏文件的数据保存及验证。 1、Linux文件空洞与稀疏文件 2、文件系统数据存储 3、文件系统调试 下载地址:Linux文件空洞与稀疏文件
READ MORE »Linux内核报错“General protection fault”原因
在Linux系统中,偶尔遇到内核报告”General protection fault”或#GP Fault,然后panic,系统宕机。在Intel编程手册中指出,General protection fault中断号为13,表示内存访问或保护检查出现异常。14号中断就是我们所熟悉的页面异常。 12 #SS Stack-Segment Fault Fault Yes Stack operations and SS register loads. 13 #GP General Protection Fault Yes Any memory reference and other protection checks. 14 #PF Page Fault Fault Yes Any memory reference. 以下是”General protection fault”更为详细的解释。 A general protection fault (GPF) in the Intel x86 and AMD […]
READ MORE »Linux物理内存页面分配
在用户态C语言程序中,我们对内存分配函数malloc()或calloc()非常熟悉;函数执行成功,就会返回需要的内存起始地址。显然这些函数在在内核态没法运行,在内核态有专门的内存申请/释放函数。 Linux内核中,如何分配和回收内存?空闲内存如何管理?本文以linux 2.6.32-220.el6版本内核源码为基础,介绍Linux内核中如何分配物理内存页面。 目 录 1 概述 2 内核页面分配与回收API 3 空闲页面的管理 3.1 物理内存空间描述 3.2 空闲页面的管理 4 伙伴算法 4.1 Buddy System 4.2 伙伴算法举例 4.2.1 页面分配过程 4.2.2 页面回收过程 4.3 Buddy系统信息查看 5 页面分配 5.1 UMA页面分配 5.2 NUMA页面分配 5.2.1 NUMA策略与cpuset功能 5.2.2 alloc_pages_current() 5.3 __alloc_pages_nodemask() 5.3.1 内存迁移类型与lockdep 5.3.2 __alloc_pages_nodemask() 5.4 get_page_from_freelist() 5.4.1 区域(Zone)水准 5.4.2 Hot-N-Cold页面 5.4.3 […]
READ MORE »