From c17beec7d41c20999e80858a60b178e3cb03feea Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Thu, 19 Mar 2020 21:01:34 -0400 Subject: [PATCH] Do not exclude used cachelines from flushing Lower layer is prepared to handle used cachelines by acquiring asynchronus read lock. It is very likely that by the time the cacheline is actually cleaned its lock state changes. So checking the lock at the moment of constructing dirty cachelines list makes little sense. Signed-off-by: Adam Rutkowski --- src/mngt/ocf_mngt_flush.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mngt/ocf_mngt_flush.c b/src/mngt/ocf_mngt_flush.c index 66a6fd9..9d375df 100644 --- a/src/mngt/ocf_mngt_flush.c +++ b/src/mngt/ocf_mngt_flush.c @@ -166,9 +166,6 @@ static int _ocf_mngt_get_sectors(ocf_cache_t cache, ocf_core_id_t core_id, if (!metadata_test_dirty(cache, i)) continue; - if (ocf_cache_line_is_used(cache, i)) - continue; - /* It's core_id cacheline and it's valid and it's dirty! */ p[j].cache_line = i; p[j].core_line = core_line; @@ -261,9 +258,6 @@ static int _ocf_mngt_get_flush_containers(ocf_cache_t cache, if (!metadata_test_dirty(cache, i)) continue; - if (ocf_cache_line_is_used(cache, i)) - continue; - curr = &fc[core_revmap[core_id]]; ENV_BUG_ON(curr->iter >= curr->count);