主权项 |
1. A cache management method, applied to a storage system comprising a cache, a non-volatile storage device, and a cache management apparatus, wherein the cache is configured to store data read from the non-volatile storage device and data to be written into the non-volatile storage device wherein the method comprises:
determining, by the cache management apparatus, a to-be-accessed page is neither in a clean page subpool of the cache nor in a dirty page subpool of the cache, wherein the clean page subpool is a set of pages that are not modified in the cache, and the dirty page subpool is a set of pages that have been modified in the cache; determining, by the cache management apparatus, a capacity relationship among the clean page subpool, the dirty page subpool and the cache; determining, by the cache management apparatus, whether identification information of the to-be-accessed page is in a history list of clean pages or a history list of dirty pages in response to the capacity relationship indicating that a capacity of the dirty page subpool and the clean page subpool corresponds to a capacity of the cache, wherein the history list of clean pages is configured to store identification information of clean pages that are recently displaced from the cache, and wherein the history list of dirty page is configured to store identification information of dirty pages that are recently displaced from the cache; increasing, by the cache management apparatus, a maximum capacity of the clean page subpool in response to the identification information of the to-be-accessed page being in the history list of clean pages; and decreasing, by the cache management apparatus, the maximum capacity of the clean page subpool in response to the identification information of the to-be-accessed page being in the history list of dirty pages. |