Legal claims defining the scope of protection, as filed with the USPTO.
1. A method, performed by a computing device, of improving utilization of cache space of the computing device, the method comprising: storing data used by a set of cache managers in a set of buffer cache pages of memory of the computing device, each buffer cache page of the set of buffer cache pages being pointed to by a respective associated buffer cache descriptor (BCD); upon any buffer cache page of the set of buffer cache pages becoming unused by the set of cache managers, placing the associated BCD of that buffer cache page onto a tail end of an LRU (least-recently-used) queue, the LRU queue being arranged such that BCDs that point to buffer cache pages that were used more recently are positioned closer to the tail end and BCDs that point to buffer cache pages that were used less recently are positioned closer to a head end of the LRU queue; for a set of BCDs positioned at the head end of the LRU queue, compressing the buffer cache pages pointed to by those BCDs into fewer buffer cache pages, thereby freeing at least one buffer cache page for reuse; and adjusting pointers within the set of BCDs positioned at the head end of the LRU queue to point to locations within the fewer buffer cache pages; wherein compressing the buffer cache pages pointed to by those BCDs into fewer buffer cache pages includes traversing the LRU queue from the head end towards the tail end, compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory, each buffer cache page being separately compressed.
2. The method of claim 1 wherein adjusting pointers within the set of BCDs positioned at the head end of the LRU queue to point to locations within the fewer buffer cache pages includes, for each group of consecutively-positioned BCDs upon which compression was performed: obtaining an unused BCD, hereinafter referred to as a surrogate BCD; storing a pointer to the single buffer cache page of memory within the surrogate BCD; modifying each consecutively-positioned BCD within the group to point to the surrogate BCD instead of the buffer cache page to which it previously pointed; storing, within each consecutively-positioned BCD, an offset within the single buffer cache page of memory at which the separately compressed buffer cache page previously pointed to by the respective consecutively-positioned BCD is now stored in compressed form; and storing a hold count value within the surrogate BCD, the hold count value reflecting how many consecutively-positioned BCDs are within the group.
3. The method of claim 2 wherein the method further comprises, upon a cache manager of the set of cache managers attempting to re-access a compressed buffer cache page referred to by a BCD on the LRU queue, referred to as the re-accessed BCD: obtaining a fresh buffer cache page not currently used to store active data, hereinafter referred to as a new buffer cache page; locating the compressed buffer cache page with reference to the pointer to the single buffer cache page of memory within the surrogate BCD pointed to by the re-accessed BCD and with reference to the offset stored within the re-accessed BCD; decompressing the located compressed buffer cache page into the new buffer cache page; modifying the re-accessed BCD to point to the new buffer cache page instead of the surrogate BCD to which it previously pointed; decrementing the hold count value within the surrogate BCD; and removing the re-accessed BCD from the LRU queue to be sent to the cache manager of the set of cache managers.
4. The method of claim 2 wherein the method further comprises, upon a cache manager of the set of cache managers attempting to obtain, from the LRU queue, a fresh buffer cache page not currently used to store active data: locating the surrogate BCD pointed to by a head BCD positioned at the head end of the LRU queue; when the surrogate BCD pointed to by the head BCD has a hold count indicating that more than one BCD is pointing to it, decrementing the hold count of the surrogate BCD pointed to by the head BCD and removing the head BCD from the LRU queue, repeating until the surrogate BCD pointed to by the head BCD has a hold count indicating that only one BCD is pointing to it; and when the surrogate BCD pointed to by the head BCD has a hold count indicating that only one BCD is pointing to it: incrementing a generation number stored within the head BCD and a generation number stored within the surrogate BCD; modifying the head BCD to point to the single buffer cache page of memory pointed to by the surrogate BCD instead of pointing to the surrogate BCD to which it previously pointed; decrementing the hold count of the surrogate BCD and placing the surrogate BCD into a reserve pool of BCDs without associated buffer cache pages; and removing the head BCD from the LRU queue to be sent to the cache manager of the set of cache managers.
5. The method of claim 2 wherein freeing at least one buffer cache page for reuse includes, for at least one group of consecutively-positioned BCDs upon which compression was performed: obtaining a BCD from a reserve pool of BCDs without associated buffer cache pages; modifying the obtained BCD to point to a buffer cache page that was previously pointed to by one of the consecutively-positioned BCDs within the at least one group of consecutively-positioned BCDs upon which compression was performed; and placing the obtained BCD onto an invalid queue, making it available to provide a fresh buffer cache page.
6. The method of claim 1 wherein buffers pointed to by a plurality of BCDs positioned at the tail end of the LRU queue remain uncompressed.
7. The method of claim 1 wherein: the method further includes performing an analysis to establish a cache utilization pattern; and compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory includes applying a varying degree of compression depending on the established cache utilization pattern.
8. The method of claim 7 wherein applying the varying degree of compression depending on the established cache utilization pattern includes selecting from a variety of compression algorithms which vary in what average number of consecutively-positioned BCDs may be compressed into a single buffer cache page of memory.
9. The method of claim 7 wherein applying the varying degree of compression depending on the established cache utilization pattern includes selecting how far to traverse the LRU queue from the head end towards the tail end in performing compression.
10. The method of claim 7 wherein: performing the analysis to establish the cache utilization pattern includes determining how many BCDs were requested from the head end of the LRU queue in a period of time; and applying the varying degree of compression depending on the established cache utilization pattern includes applying a higher level of compression when more BCDs were requested from the head end of the LRU queue in the period of time and applying a lower level of compression when fewer BCDs were requested from the head end of the LRU queue in the period of time.
11. The method of claim 10 wherein: performing the analysis to establish the cache utilization pattern further includes determining how many BCDs were requested from within the LRU queue for re-access in the period of time; and applying the varying degree of compression depending on the established cache utilization pattern includes applying a lower level of compression when more BCDs were requested from within the LRU queue for re-access in the period of time and applying a higher level of compression when fewer BCDs were requested from within the LRU queue for re-access in the period of time.
12. The method of claim 1 wherein the data used by the set of cache managers stored in the set of buffer cache pages includes filesystem metadata about a filesystem stored in persistent storage of the computing device, the computing device being configured to provide access to the filesystem.
13. An apparatus comprising: memory, the memory storing: a set of buffer cache descriptors (BCD); and a buffer cache comprising a set of buffer cache pages, each buffer cache page of the set of buffer cache pages being pointed to by a respective associated BCD of the set of BCDs; and processing circuitry configured to improve utilization of cache space by: storing data used by a set of cache managers in the set of buffer cache pages; upon any buffer cache page of the set of buffer cache pages becoming unused by the set of cache managers, placing the associated BCD of that buffer cache page onto a tail end of an LRU (least-recently-used) queue, the LRU queue being arranged such that BCDs that point to buffer cache pages that were used more recently are positioned closer to the tail end and BCDs that point to buffer cache pages that were used less recently are positioned closer to a head end of the LRU queue; for a set of BCDs positioned at the head end of the LRU queue, compressing the buffer cache pages pointed to by those BCDs into fewer buffer cache pages, thereby freeing at least one buffer cache page for reuse; and adjusting pointers within the set of BCDs positioned at the head end of the LRU queue to point to locations within the fewer buffer cache pages; wherein compressing the buffer cache pages pointed to by those BCDs into fewer buffer cache pages includes traversing the LRU queue from the head end towards the tail end, compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory, each buffer cache page being separately compressed.
14. The apparatus of claim 13 wherein: the apparatus further comprises: persistent storage that stores a filesystem; and a disk controller configured to control the persistent storage, allowing the apparatus to provide access to the filesystem; and the data used by the set of cache managers stored in the set of buffer cache pages includes filesystem metadata about the filesystem stored in the persistent storage.
15. The apparatus of claim 13 wherein adjusting pointers within the set of BCDs positioned at the head end of the LRU queue to point to locations within the fewer buffer cache pages includes, for each group of consecutively-positioned BCDs upon which compression was performed: obtaining an unused BCD, hereinafter referred to as a surrogate BCD; storing a pointer to the single buffer cache page of memory within the surrogate BCD; modifying each consecutively-positioned BCD within the group to point to the surrogate BCD instead of the buffer cache page to which it previously pointed; storing, within each consecutively-positioned BCD, an offset within the single buffer cache page of memory at which the separately compressed buffer cache page previously pointed to by the respective consecutively-positioned BCD is now stored in compressed form; and storing a hold count value within the surrogate BCD, the hold count value reflecting how many consecutively-positioned BCDs are within the group.
16. The apparatus of claim 13 wherein buffers pointed to by a plurality of BCDs positioned at the tail end of the LRU queue remain uncompressed.
17. The apparatus of claim 13 wherein: the processing circuitry is further configured to perform an analysis to establish a cache utilization pattern; and compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory includes applying a varying degree of compression depending on the established cache utilization pattern.
18. A non-transitory computer-readable storage medium that stores instructions, which, when executed by a computing device, cause the computing device to improve utilization of cache space of the computing device by: storing data used by a set of cache managers in a set of buffer cache pages of memory of the computing device, each buffer cache page of the set of buffer cache pages being pointed to by a respective buffer cache descriptor (BCD); upon a buffer cache page of the set of buffer cache pages becoming unused by the set of cache managers, placing the respective BCD of that buffer cache page onto a tail of an LRU (least-recently-used) queue, the LRU queue being arranged such that BCDs that point to more recently used buffer cache pages are positioned closer to the tail and BCDs that point to less recently used buffer cache pages are positioned closer to a head of the LRU queue; for a set of BCDs positioned at the head of the LRU queue, compressing the buffer cache pages pointed to by those BCDs into fewer buffer cache pages, thereby freeing at least one buffer cache page for reuse, by traversing the LRU queue from the head towards the tail, compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory, each buffer cache page being separately compressed; and adjusting pointers within the set of BCDs positioned at the head of the LRU queue to point to locations within the fewer buffer cache pages.
19. The non-transitory computer-readable storage medium of claim 18 wherein: the instructions, when executed by the computing device, further cause the computing device to perform an analysis to establish a cache utilization pattern; and compressing buffer cache pages pointed to by groups of consecutively-positioned BCDs within the LRU queue such that the buffer cache pages pointed to by each group of consecutively-positioned BCDs are compressed into a single buffer cache page of memory includes applying a varying degree of compression depending on the established cache utilization pattern.
Unknown
August 8, 2017
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.