F2FS
Prof. Dongkun Shin (dongkun@skku.edu)
TA – Junho Lee (crow6316@skku.edu)
TA – Somm Kim (sommkim@skku.edu)
Embedded Software Laboratory
Sungkyunkwan University
http://nyx.skku.ac.kr
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu)
Contents
• Serial Communication Tool
– Windows
• Putty
– Linux
• Minicom
• File System Write Policy Comparison
– Ext4, F2FS
– LBA Tracing on Jasmine
• Project Plan
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 2
Serial Communication on Linux
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu)
Serial Communication on Linux
• How to identify /dev/ttyxxx
– dmesg | grep “tty”
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 4
Serial Communication on Linux
• Minicom: Serial communication tool
– Install: sudo apt-get install minicom -y
– Setup: sudo minicom -s
• 1. Serial port setup • 2. Screen and keyboard
Press ‘A’ and modify
Press ‘R’
Press ‘T’
• 3. Save setup as dfl
• 4. Exit from Minicom
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 5
Serial Communication on Linux
• Minicom: Serial communication tool
– Run: sudo minicom
– Run with the output file saved: sudo minicom –C output.txt
– Quit: Press ‘Ctrl+A’ → Press ‘X’
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 6
File System Write Policy Comparison
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu)
FTL Testing: FIO
• Check the device.
– lsblk
• Create a partition.
– fdisk /dev/sdh (your device in /dev)
– Run 'n' command and 'w' command
– Type ‘+128M’ at last sector and ‘w’ command
• Create a file system.
– mkfs –t ext4 /dev/sdh1 (your device partition in /dev)
• Mount the device.
– mount –t ext4 /dev/sdh1 /mnt
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 8
FTL Testing: FIO
• Install the FIO.
– sudo apt-get install fio
– Verify the installation with the fio command.
• Write a FIO script. [global]
ioengine=libaio
– vim test.fio directory=/mnt
rw=randwrite
bs=32k
filesize=32m
time_based=1
• Run the FIO. runtime=60
– fio test.fio [job]
numjobs=1
fsync=10
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 9
F2FS File System Usage
• Install the F2FS file system tools.
– sudo apt-get install f2fs-tools
• IPU(In-Place Update) disable
– echo 0 > /sys/fs/f2fs/sdh1/ipu_policy (your device in /dev)
• Check the F2FS file system status information.
– cat /sys/kernel/debug/f2fs/status
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 10
LBA Tracing
• Add code to print the LBA and sector counts to
the firmware code. (./sata/sata_main.c)
– Use tab(\t) for ease of excel processing
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 11
Write Policy Comparison
• Install the firmware with the code that prints LBA.
• After connecting the Jamine in Linux, turn on the serial monitor with minicom.
– Save to file.
• Mount the file system to experiment with.
• IPU(In-Place Update) disable (Only F2FS)
• Experiment using the FIO benchmark.
– Use the options listed above.
• Open the generated LBA Trace in Excel and draw a graph.
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 12
Write Policy Comparison
• Sample graph
< Ext4 > < F2FS >
• Submit to the icampus
– Excel file with data and graph
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 13
Project Plan
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu)
Project Plan
• Submit a project design, implementation and
experiment plan for each group.
– Include current progress.
– About 1-2 pages in pdf
• Submit to the icampus
– Due: 12/01(Sun.) 23:59:59
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin (dongkun@skku.edu) 15