Giter Club home page Giter Club logo

flashftldriver's Introduction

FlashDriver

A User-space Flash Simulation Platform.

Architecture

  --------------------------------
  |          Interface           | e.g. local, network
  --------------------------------
                 |
  --------------------------------
  |          Algorithm           | e.g. PFTL, DFTL,  etc.
  --------------------------------
                 |
  --------------------------------
  |            Lower             | e.g. BDBM, POSIX(file), memory(RAM Drive), etc.
  --------------------------------
  
/*
 * Each layer is bundled to dedicated directory, - interface/ algorithm/ lower/ -
 * and implemented components of layers would be mapped on Makefile (expain it on the bottom)
 */

1. Interface

The first layer handles user requests with LPA, which means it works like block layer of kernel.
We provide a simple micro-benchmark program on interface/main.c.

However, to test with user application such as FIO, you must forward block-level requests to this layer.
We currently use NBD kernel module to test performance of our platform. (add details later)

2. Algorithm

This layer is designed to simulate FTL in SSD.
It translates LPA(from interface) to PPA(to lower) using their own mapping algorithm of each module.
Various LPA to PPA mapping algorithms could be implemented on top of it.
You can easily create your own FTL module with FlashDriver's form.
(Refer algorithm/normal/ for example)

3. Lower

Lower layer is a mimic of physical addressing part of SSD.
This layer forwards requests, which consists given PPA from upper layer, to selected lower module(e.g. BDBM, POSIX(file), memory(RAM Drive)).
For example, to simulate with posix systemcall, it would call posix APIs to read/write to given address. (read(), write(), lseek())
To implement new lower module, the target platform have to expose essential interfaces to read/write actual data.

How to run

Setting

FlashDriver$ vim ./include/settings.h
-> set GIGAUNIT variable as device size (e.g. #define GIGAUNIT 32L for 32GB test)

FlashDriver$ vim ./interface/main.c
-> add benchmarks what you want (e.g. bench_add(SEQSET,0,RANGE,RANGE); for sequential write bench)

Make new main file

1. copy ./interface/mainfiles/default_main.c [your_main_file]
2. edit the your main file
3. edit Makefile
original Makefile:131
driver: ./interface/mainfiles/default_main.c libdriver.a
	$(CC) $(CFLAGS) -o $@ $^ $(ARCH) $(LIBS)

edited
driver: [your_main_file] libdriver.a
	$(CC) $(CFLAGS) -o $@ $^ $(ARCH) $(LIBS)

Makefile

FlashDriver$ vim Makefile
-> You can select module for each layer to operate with.

[Example]
TARGET_INF=interface
TARGET_ALGO=dftl            # Demand-based FTL
TARGET_LOWER=posix_memory   # memory(RAM Drive)
-> Make with interface as Interface module
   dftl as Algorithm module
   posix_memory as Lower module

* Directory name of targets must exist on each layer's directory
  (e.g. algorithm/dftl/ lower/posix_memory/ )

Run

FlashDriver$ make driver
FlahsDriver$ ./driver

Help

Contact to [email protected] or [email protected]
README would be updated someday

flashftldriver's People

Contributors

kukania 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.