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

@@ -197,7 +197,7 @@ int ocf_write_wt(struct ocf_request *req)
*/
ocf_engine_map(req);
if (!req->info.eviction_error) {
if (!req->info.mapping_error) {
/* Lock request for WRITE access */
lock = ocf_req_trylock_wr(req);
}
@@ -205,7 +205,7 @@ int ocf_write_wt(struct ocf_request *req)
OCF_METADATA_UNLOCK_WR(); /*- END Metadata WR access ---------*/
}
if (!req->info.eviction_error) {
if (!req->info.mapping_error) {
if (lock >= 0) {
if (lock != OCF_LOCK_ACQUIRED) {
/* WR lock was not acquired, need to wait for resume */