Add promotion policy API and use it in I/O path

Promotion policy is supposed to perform ALRU noise filtering by
eliminating one-hit wonders being added to cache and polluting it.

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial
2019-07-11 12:19:29 +02:00
parent 999f3f7245
commit 917cbd859a
20 changed files with 409 additions and 21 deletions

View File

@@ -269,7 +269,7 @@ int ocf_read_generic(struct ocf_request *req)
*/
ocf_engine_map(req);
if (!req->info.eviction_error) {
if (!req->info.mapping_error) {
if (ocf_engine_is_hit(req)) {
/* After mapping turns out there is hit,
* so lock OCF request for read access
@@ -287,7 +287,7 @@ int ocf_read_generic(struct ocf_request *req)
/*- END Metadata WR access -----------------------------------*/
}
if (!req->info.eviction_error) {
if (!req->info.mapping_error) {
if (lock >= 0) {
if (lock != OCF_LOCK_ACQUIRED) {
/* Lock was not acquired, need to wait for resume */