Method and system for recycling garbage in Linux Bcache
The invention discloses a method for recycling garbage in Linux Bcache. The method comprises the following steps: setting an auxiliary B + tree; and when the write request process and the GC process are concurrent, inserting the data element of the write request into the auxiliary B + tree, and inse...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method for recycling garbage in Linux Bcache. The method comprises the following steps: setting an auxiliary B + tree; and when the write request process and the GC process are concurrent, inserting the data element of the write request into the auxiliary B + tree, and inserting the inserted data element into the original B + tree after the GC process is finished. According to the method, through assistance of B + tree, flow interruption caused by the fact that a request must wait when a write request and a GC process are concurrent is avoided; in combination with a preemptive lock, the problem of flow interruption caused by the fact that a read request must wait in the Bcache GC process is solved; and meanwhile, by maintaining the priority of the GC tasks, interruption of space allocation of the cache equipment due to the fact that the GC tasks are always preempted is avoided.
本发明公开了一种Linux Bcache中的垃圾回收方法,包括设置辅助B+tree;在写请求流程与GC流程并发时,写请求的数据元素插入所述辅助B+tree中,并在GC流程结束后,将插入的所述数据元素插入到原始B+t |
---|