Code Monkey home page Code Monkey logo

Comments (4)

MinneyJohn avatar MinneyJohn commented on July 16, 2024

Not sure whether we need to update function cleaning_policy_acp_perform_cleaning to make it real flush "-b" dirty cache blocks no matter how much dirty blocks are in one chunk.

from ocf.

jfckm avatar jfckm commented on July 16, 2024

I think that the real error here is just wording in CLI. Maybe it should be something like **Maximum** number of dirty cache blocks to be flushed in one cleaning cycle?

As for ACP policy flushing -b dirty blocks per iteration I that that was not the behavior we were going for. Any comments on that @arutk ?

from ocf.

arutk avatar arutk commented on July 16, 2024

I believe the original intention was to have ACP clean exactly "-b" dirty cache lines. I agree with John's analysis - ACP will issue smaller I/O at the end of chunk.

So it looks like implementation shortcoming. Possible fix would involve:

  1. modifying acp_perform_cleaning() to issue second flush I/O if the first call had not reached the requested flush package size.
    We probably shouldn't iterate over more than two chunks in a single iteration, since this means that the cache is basically clean and cleaner performance is not relevant at this point.
  2. _acp_prepare_flush_data() and _acp_flush() would accept offset parameter to indicate start position in in state->flush array.
  3. Modify _acp_flush_end() to wait for the second I/O before calling upper layer completion callback.

from ocf.

arutk avatar arutk commented on July 16, 2024

This doesn't seem to be a noticeable problem, as ACP by design cleans the chunks that are most dirty. Assuming there is some workload LBA locality (which is a reasonable assumption for cache), the core LBA range (chunk) being cleaned has relatively large number of dirty cachelines. So one would need to set very large flush portion to make this problem noticable (i.e. measure reduced cleaner bandwidth).

We haven't heard from any user hitting this problem in real life scenarios, so closing this .

from ocf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.