Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

async plog write #33

Closed
akiradeveloper opened this Issue Mar 4, 2014 · 3 comments

Comments

Projects
None yet
1 participant
Owner

akiradeveloper commented Mar 4, 2014

serialized plog write is too slow. we must improve it.

make it async with ref count. Most of the writes are async thus can be gone on failure and what we need to protect from such accidents by logging on plog are those with REQ_FUA and those acked before REQ_FLUSH acks.

pseudo code:

plog_start_lock()
inc()
async_io()
plog_end_unlock()

if (REQ_FUA):
  wait(!refcount)
  flush_io()

If we complete this enhancement, we results in having two refcount locking that both inc in locking (one is in mutex and the other is between plog lock (wait and wakeup)). The design will not get complicated because there just appears an identical locking technique twice.

before implementation, performance evaluation should be done. And question should be resolved that PRAM API can implement it too.

Owner

akiradeveloper commented Mar 5, 2014

Performs really good. Only modified do_append_plog_t1 to async. WIll apply

Owner

akiradeveloper commented Mar 5, 2014

barrier_plog_writes() will be defined that wait for the inflight plog writes are all acked and send REQ_FLUSH to the plog device.

Owner

akiradeveloper commented Mar 7, 2014

perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment