Two-phase eviction process for file handle caches
First Claim
1. A method for evicting entries from a file handle cache, each entry in the file handle cache storing a file handle associated with an open file in a file system, the method comprising:
- analyzing each entry in the file handle cache to identify entries to be marked for eviction and marking the identified entries for eviction while maintaining a shared lock on the entire file handle cache, the shared lock allowing the file handle cache to be concurrently accessed by one or more processes to obtain file handles for use in servicing requests for content from the file system; and
removing the entries marked for eviction from the file handle cache while maintaining an exclusive lock on the entire file handle cache, the exclusive lock preventing the file handle cache from being concurrently accessed by the one or more processes.
2 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods are provided for evicting entries from a file handle cache. In accordance with certain embodiments, a two-stage eviction process is utilized. In a first stage of the eviction process, entries in the file entry cache are analyzed and marked for eviction while a shared lock is maintained on the file handle cache. The shared lock enables the file handle cache to be concurrently accessed by a content serving system to service content requests. In a second stage of the eviction process, entries in the file handle cache that are marked for eviction are removed while an exclusive lock is maintained on the file handle cache. The exclusive lock prevents the content serving system from concurrently accessing the file handle cache to service content requests.
-
Citations
20 Claims
-
1. A method for evicting entries from a file handle cache, each entry in the file handle cache storing a file handle associated with an open file in a file system, the method comprising:
-
analyzing each entry in the file handle cache to identify entries to be marked for eviction and marking the identified entries for eviction while maintaining a shared lock on the entire file handle cache, the shared lock allowing the file handle cache to be concurrently accessed by one or more processes to obtain file handles for use in servicing requests for content from the file system; and removing the entries marked for eviction from the file handle cache while maintaining an exclusive lock on the entire file handle cache, the exclusive lock preventing the file handle cache from being concurrently accessed by the one or more processes. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system, comprising:
-
at least one processor; memory connected to the at least one processor; a file system stored at least in part in the memory and executed by the at least one processor; and a content serving system stored at least in part in the memory and executed by the at least one processor, the content serving system being configured to service requests for content by accessing files on the file system, the content serving system including; a file handle cache having a plurality of entries, each entry in the file handle cache storing a file handle associated with an open file in the file system, the file handle cache being accessible to obtain file handles for accessing open files on the file system; and file handle cache management logic that is configured to analyze a time to live counter assigned to each entry in the file handle cache and to mark an entry for eviction if the time to live counter assigned thereto has expired, the value of the time to live counter that is assigned to each entry in the file handle cache being adaptively determined based on a measure of utilization of a system memory that stores contents of each open file associated with each file handle stored in the file handle cache, the system memory being a different entity than the file handle cache. - View Dependent Claims (13, 14, 15)
-
-
16. A system, comprising:
-
at least one processor; a memory connected to the at least on processor; a file system stored at least in part in the memory and executed by the at least one processor; a file handle cache stored at least in part in the memory, each entry in the file handle cache storing a file handle associated with an open file in the file system; and file handle cache management logic configured to; analyze each entry in the file handle cache to identify entries to be marked for eviction and mark the identified entries for eviction while maintaining a shared lock on the entire file handle cache, the shared lock allowing the file handle cache to be concurrently accessed by one or more processes to obtain file handles for use in servicing requests for content from the file system; and remove the entries marked for eviction from the file handle cache while maintaining an exclusive lock on the entire file handle cache, the exclusive lock preventing the file handle cache from being concurrently accessed by the one or more processes. - View Dependent Claims (17, 18, 19, 20)
-
Specification