October 12, 2011

RXDSK - RapidDisk - Ram Block Device

RXDSK is a project currently in development which is worth checking out and keeping an eye on. It is quiet similar to ZRAM (previously compache) and TMPFS/RAMFS but has some minor differences which renders it more flexible for generic usage. ZXDSK allows for example an export of the ram disk to a physical disk, making it therefore usable as a swap device. According to the developer, LZO is planned to be used as a compression layer, making it therefore quiet similar in this light to ZRAM. ... Read more

September 8, 2011

RedHat/CentOS 6 Xen Kernel RPMs

I have created a working Red Hat/CentOS 6 Xen Dom0 Kernel including backport patches. I had to hack to the blktap driver hooks to finalize support of the module due to the interface changes in the recent vanilla kernel. But all is working. [[email protected] ~]# uname -rsm Linux 2.6.32-131.12.1.el6.alouche.xen.dom0.x86_64 x86_64 [[email protected] ~]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1024 4 r----- 235.5 For download of the RPMs or mirror use, see http://mirror. ... Read more

July 18, 2011

The Kernel Samepage Merging Process

KSM, simply put is a service daemon which scans the page addresses to find duplicate pages, merges them and therefore reduces the memory density. The code used in this post as example can be found under /mm/ksm.c in the kernel source. Before continuing, it is important to keep in mind that: KSM uses a red-black tree for the stable and unstable trees - efficiency is $$O(\log\ n)$$ per tree since the height can never be more than $$(2log\ (n+1))$$ with n being the number of nodes. ... Read more

May 9, 2011

KGPU - GPU Computing Framework

KGPU is a project that aims to port GPU capabilities directly to the linux kernel. Utilizing CUDA or OpenCL, userspace application can offload calculations to the GPU card, however KGPU extends this now transparently to the kernel. As stated by the project’s site The idea behind KGPU is to treat the GPU as a computing co-processor for the operating system, enabling data-parallel computation inside the Linux kernel. This allows us to use SIMD (or SIMT in CUDA) style code to accelerate Linux kernel functionality, and to bring new functionality formerly considered too compute intensive into the kernel. ... Read more

August 24, 2010

RPS and RFS - Kernel Network Stack

If you have been following the latest improvement in the release of the 2.6.35 kernel, you have probably noted 2 major network stack improvement which have create some buzz in the geek community. Ok not really! since the RPS and RFS project has been going on since a while now by the crowd @Google Inc. Since those 2 amaizing features have been fully implemented in the kernel and are now supported, I though it is a good opportunity to finally get down to the beast and try to shed some light on RPS and RFS. ... Read more

July 11, 2010

Linux Kernel Out of Memory Management

-ENOMEM Error - OOM state When the kernel needs to allocate memory to a process, its first action is to check whether or not that requested memory is available.. To achieve is, the kernel makes sure that the requested memory is globally available on the system excluding 3% reserved for root process and that the committed amount of RAM does not exceed the allowed threshold. The threshold is determined using this formula ... Read more

May 15, 2010

Linux Kernel Route Cache

To understand the importance of the routing cache, it is important to keep in mind and visualize the 3 main routing hash tables in use in the kernel for routing decisions… the Route Cache (what we will be discussing), the Route Policy Database and the Route Table. It is also in this order that the network subsystem queries the tables to make a forwarding decision. To display the “Route Cache”, one could simply issue the “ip route show cache” command. ... Read more

April 19, 2009

Dive into the I/O subsystems

I decided to write this article as to give a short intro, which I hope would help one another to dive into understanding but more tweaking the I/O scheduler for better computing performance. So what is the I/O scheduler… Talking about the I/O scheduler requires to immediately address the issue of I/O process execution on a system. Each action made by an application whether in a simple read/write manner, memory allocation in a nutshell creates an I/O request to the filesystem/virtual memory, which in return transmit the requests to the scheduler, who handles it back to the low-level device drivers… ... Read more

December 17, 2008

Strace - Reverse Engineering - System Calls

If there is one recurring problem that I often see gagging the forums is “Library missing”, or often “installed libraries which a program doesn’t find”. I decided to share a simple debugging technique which could save the day or even the hours… Google might not be the right choice all the time, when you have got strace at your finger tips. 1. System Calls To understand strace, you first need to understand what a system call is. ... Read more