Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Removing the delay of cache mode change from writeback to others #100

Open
ghost opened this issue Jul 23, 2015 · 0 comments
Open

Removing the delay of cache mode change from writeback to others #100

ghost opened this issue Jul 23, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 23, 2015

Lately, we found the substantial delay of cache mode change from writeback to others when write operations are heavy.

The delay is caused by flushing dirty ssd blocks to hard disk, but there is no need to flush.
I think the dirty blocks on ssd does not affect to the writethrough and readonly mode. The cache consistency can be kept.

The related code lines are below.
eio_ttc.c
1092 /* Wait for nr_dirty to drop to zero /
1093 if (dmc->mode == CACHE_MODE_WB && mode != CACHE_MODE_WB) {
1094 if (CACHE_FAILED_IS_SET(dmc)) {
1095 pr_err
1096 ("cache_edit: Can not proceed with edit for Failed cache "%s".",
1097 dmc->cache_name);
1098 error = -EINVAL;
1099 goto out;
1100 }
1101
1102 error = eio_finish_nrdirty(dmc);
1103 /
This error can mostly occur due to Device removal */
1104 if (unlikely(error)) {
1105 pr_err
1106 ("cache_edit: nr_dirty FAILED to finish for cache "%s".",
1107 dmc->cache_name);
1108 goto out;
1109 }
1110 EIO_ASSERT((dmc->sysctl_active.do_clean & EIO_CLEAN_KEEP) &&
1111 !(dmc->sysctl_active.do_clean & EIO_CLEAN_START));
1112 EIO_ASSERT(dmc->sysctl_active.fast_remove ||
1113 (atomic64_read(&dmc->nr_dirty) == 0));
1114 }

The lines between 1092-1114 should be removed.

@ghost ghost changed the title Removing the delay of cache mode change from writeback to readonly Removing the delay of cache mode change from writeback to others Jul 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants