Skip to content

KGPU Home

wbsun edited this page Dec 17, 2012 · 7 revisions

IMPORTANT

I noticed there are growing interests in KGPU. Thank you guys! But I am currently working on my glick project and don't have much time to refactoring KGPU. So the biggest limitation may be that it can't work with recently kernels. External contributions are extremely welcome! Those who are interested in improving KGPU are welcome to ask for being collaborators or send pull request! I will definitely go back to KGPU after glick.

We are refactoring KGPU to make it a better architecture for future functionality, current code base is extremely unstable, so if you want to try KGPU, use the old master branch on github. The 'refactor' branch won't be updated until we finish the work.

How to GET it

To keep up-to-date, you may track it from Github*. To access the code, using git to clone: git@github.com:wbsun/kgpu.git or goto https://github.com/wbsun/kgpu .

What is It?

KGPU is a GPU computing framework for the Linux kernel. It allows Linux kernel to call CUDA programs running on GPUs directly. The motivation is to augment operating systems with GPUs so that not only userspace applications but also the operating system itself can benefit from GPU acceleration. It can also free the CPU from some computation intensive work by enabling the GPU as an extra computing device.

Modern GPUs can be used for more than just graphics processing; they can run general-purpose programs as well. While not well-suited to all types of programs, they excel on code that can make use of their high degree of parallelism. Most uses of so-called ``General Purpose GPU'' (GPGPU) computation have been outside the realm of systems software. However, recent work on software routers and encrypted network connections has given examples of how GPGPUs can be applied to tasks more traditionally within the realm of operating systems. These uses are only scratching the surface. Other examples of system-level tasks that can take advantage of GPUs include general cryptography, pattern matching, program analysis, and acceleration of basic commonly-used algorithms; we give more details in our whitepaper. These tasks have applications on the desktop, on the server, and in the datacenter.

The current KGPU release includes a demo of GPU augmentation: a GPU-accelerated AES cipher, which can be used in conjunction with the eCryptfs encrypted filesystem. This enables read/write bandwidths for an ecrypted filesystem that can reach a factor of 3x ~ 4x improvement over an optimized CPU implementation (using a GTX 480 GPU).

KGPU is a project of the Flux Research Group at the University of Utah. It is supported by NVIDIA through a graduate fellowship awarded to Weibin Sun.

More

We have a short whitepaper describing the motivation and design of KGPU.

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. Simply put, KGPU enables vector computing for the kernel.

It makes the Linux kernel really parallelized: it is not only processing multiple requests concurrently, but can also partition a single large requested computation into tiles and spread them across the large number of cores on a GPU.

KGPU is not an OS running on GPU; this is practically impossible because of the limited functionality of current GPUs.

Performance

Goto IozoneBenchmarkResults to see the GPU-cipher based eCryptfs performance tested by the Iozone benchmark. Our KGPU-accelerated version of eCryptfs is able to reach the full speed of a modern SATA-attached SSD drive, beating the CPU version by 3x - 4x.

News

  • A flowchart to describe GPU request processing is uploaded at GoogleCode site. Find it at the Downloads page.
  • CTR, the counter mode has been implemented, not fully tested yet.
  • What are we doing now? Here:
    1. We are implementing Blowfish/Twofish, which is also used by eCryptfs as encryption algorithm, so that CPUs with AES-NI won't kick our aSs :)
    2. We are modifying dm-crypt in Linux kernel. It is a disk-encryption mechanism and also widely used.
    3. We are knocking our heads hard to try to find out what we can do next for the Linux kernel with KGPU ...
  • The GPU-cipher based eCryptfs has been done! Both write and read are supported and accelerated by GPU. Download the kgpu-fsready.tar.gz to enjoy the speedup by using large buffer for read/write.
  • Try the current github source or download the zip package from here to try the GPU-accelerated eCryptfs! It can be much more faster than the original eCryptfs when doing read with large data buffer, say: read(fd, one_mega_bytes_buffer, 1<<20);.
Clone this wiki locally