GithubHelp home page GithubHelp logo

uksm's Introduction

UKSM


The patches in this repo are the latest UKSM patches

The current release number: 0.1.2.6

This release includes two bug fixes from Huawei, many thanks to their engineers and esepcially to @colo-ft who submitted the patches.

Changelog for all versions is in Documentation/vm/uksm.txt.

What is it?

The Ultra Kernel Samepage Merging feature

Ultra KSM. Copyright (C) 2011-2016 Nai Xia

This is an improvement upon KSM. Some basic data structures and routines are borrowed from ksm.c .

Its new features:

  1. Full system scan: It automatically scans all user processes' anonymous VMAs. Kernel-user interaction to submit a memory area to KSM is no longer needed.

  2. Rich area detection: It automatically detects rich areas containing abundant duplicated pages based. Rich areas are given a full scan speed. Poor areas are sampled at a reasonable speed with very low CPU consumption.

  3. Ultra Per-page scan speed improvement: A new hash algorithm is proposed. As a result, on a machine with Core(TM)2 Quad Q9300 CPU in 32-bit mode and 800MHZ DDR2 main memory, it can scan memory areas that does not contain duplicated pages at speed of 627MB/sec ~ 2445MB/sec and can merge duplicated areas at speed of 477MB/sec ~ 923MB/sec.

  4. Thrashing area avoidance: Thrashing area(an VMA that has frequent Ksm page break-out) can be filtered out. My benchmark shows it's more efficient than KSM's per-page hash value based volatile page detection.

  5. Misc changes upon KSM:

    • It has a fully x86-opitmized memcmp dedicated for 4-byte-aligned page comparison. It's much faster than default C version on x86.
    • rmap_item now has an struct *page member to loosely cache a address-->page mapping, which reduces too much time-costly follow_page().
    • The VMA creation/exit procedures are hooked to let the Ultra KSM know.
    • try_to_merge_two_pages() now can revert a pte if it fails. No break_ ksm is needed for this case.
  6. Full Zero Page consideration(contributed by Figo Zhang) Now uksmd consider full zero pages as special pages and merge them to an special unswappable uksm zero page.

Credits

Ultra KSM. Copyright (C) 2011-2016 Nai Xia

Reference

[FAST '18] UKSM: Swift Memory Deduplication via Hierarchical and Adaptive Memory Region Distilling [PDF] [Slides]

uksm's People

Contributors

asherliu avatar bruce-one avatar dolohow avatar mdirik avatar naixia avatar pfactum avatar skbeh avatar szpadel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.