这是一篇论文的阅读笔记,这个论文讲的是测试Android系统的一个工具链
AndroStep consists of workload generator:Mobibench and workload analyzer: MOST
我们关注的是MOST
3.2 MOST:Moblie Storage Analyzer
MOST consist of (i)a modified Linux kernel that maintins processes and file-related information for IOs;(ii)a block analyzer that enables identification of a file for a given block,(iii)blktrace utility
the information nedds to be collected from different layer.MOST collects the IOtrace at the block device driver level to deduces the file information and then it process information for each respective block.MOST addresses three reverse-mapping issue:LBA-to-file,LBA-to-process and retrospective LBA mapping
1.LBA-to-file即使用debugfs实现
2.LBA-to-process :create a process-to-block mapping table.the entry of the table is <LBA,process id>.When the IO scheduler inserts the IO request into the queue,MOST inserts the<LBA,process id>information into the process-to-block mapping table.当后期给出一个LBA,可以通过这个table可以用重新获得process id
3.retrospectve LBA mapping.In Android,many files are shortlives and are created and rapidly delete by SQLite.They are fsync()ed to NAND storage.We need file information for a given LBA when a trace is recored not when posthumously analyzed.但MOST准备分析一个LBA时,这个文件也许都已经被删掉了。怎么解决这个问题呢:MOST 创建了一个file-to-block的表,表的每一项是<LBA,FILE>.当IO调度器plugs in the LBA to the 调度队列,MOST向表中插入一项<LBA,FILE>,之后通过给定的LBA再在这个表里查需要的信息。为了减小表的大小。只为temporary file向表中插入信息。
Mobile Storage Analyzer的输出:
IO完成时间。
读or写
IO大小和扇区号
进程编号、进程名字
Block类型,元数据块、日志块or数据块
数据块存放文件的名字