The storage stack of an operating system is responsible for abstracting underlying storage devices. Efficiency and reliability are its primary goals. As a component in the storage stack, solid-state drives (SSDs) have been investigated by many studies...
The storage stack of an operating system is responsible for abstracting underlying storage devices. Efficiency and reliability are its primary goals. As a component in the storage stack, solid-state drives (SSDs) have been investigated by many studies, aiming to increase their performance with emerging components for SSDs in the storage stack. However, due to the rapid increase in SSD performance and immaturity of these new components, the efficiency and reliability of the storage stack cannot be ensured. Specifically, if the performance of the file system is lower than that of SSDs, system performance is degraded, resulting in inefficiencies. Furthermore, if SSD failures are not promptly handled due to the difference in semantics across different layers of the storage stack, system reliability is adversely affected. Although the storage stack has been studied and improved for decades, several critical issues still remain. This dissertation addresses these challenges by increasing file system performance and mitigating semantic differences within the storage stack. First, log-structured file systems (LFSs), such as F2FS, which are designed to be SSD-friendly, rely on garbage collection (GC) to reclaim logical block addresses (LBAs). However, conventional LFS GC lacks concurrency, limiting its ability to fully exploit the high performance of SSDs. To increase the performance of LFS, we parallelize the LFS GC procedure, thereby improving both LFS performance and storage stack efficiency. This approach, proposed in the dissertation, is used to enhance LFS, resulting in a scalable version of LFS called ScaleLFS. ScaleLFS mitigates contention caused by multiple GC threads employing thread-dedicated resources, lock-free metadata updates, and lock-free protection of file data. ScaleLFS is implemented on F2FS, an LFS in the Linux kernel, and evaluated using a micro-benchmark, macro-benchmark, and a real-world application. Evaluation results show that the use of ScaleLFS leads to up to 3.5×, 4.6×, and 7.0× improvements in performance compared with F2FS, a state-of-the-art scalable LFS, and an existing parallel GC scheme, respectively. Second, the current storage stack employs a passive failure-handling approach, which incurs semantic differences among SSDs, file systems, and applications, thereby delaying failure detection. It can increase the risk of data loss and lower system reliability. To mitigate this semantics difference, an active failure-checking scheme and adaptive failure-point prediction using reinforcement learning are proposed. These approaches enable minimized failure detection time and reduced data loss. Based on the proposed approaches in this dissertation, a reliability-enhancing mechanism called RL-Watchdog is developed. RL-Watchdog is prototyped in the Linux kernel. Experimental results show that the use of RL-Watchdog leads to reductions in data loss by up to 96.7% compared to the current failure-handling procedure, and its accuracy in predicting failure points reaches up to 99.8%.