GithubHelp home page GithubHelp logo

refCount alignment issue about cachelib HOT 4 CLOSED

Svelar avatar Svelar commented on April 28, 2024
refCount alignment issue

from cachelib.

Comments (4)

Svelar avatar Svelar commented on April 28, 2024 1

No really, that is caused by mistake of 'compiler optimization'. I still need more time to verify that.

But you could close this issue anytime, thanks!

from cachelib.

jaesoo-fb avatar jaesoo-fb commented on April 28, 2024

Hi @Svelar

Thanks for the report. What is the exact processor architecture? Just in case, is it 32 bit architecture?

As explained here, the refcount is third members and should start aligned on 4B since the access hook and mm hook are both aligned on 8B as long as the alloc sizes are aligned on 4B. In fact, generateAllocSizes(...) should give all alloc sizes aligned on 8B.

So, this might be just a test issue where we are passing some arbitrary alloc sizes (e.g., 50B) for testing. I think we can enforce the 4B alignment of alloc sizes and amend the tests accordingly for now.

For disclaimer, we are not testing on ARM for now, so the build and the operation are not guaranteed. We might need to consider the ARM support in the future for various reasons, but we always welcome any contribution in the meantime.

from cachelib.

Svelar avatar Svelar commented on April 28, 2024

Hi @jaesoo-fb , thanks for your reply.

I tested on kunpeng 920 (aarch64) server.

Yes, you are right. Nothing is affected but tests. Actually, I modified a little bit codes to enforce allocSize aligned on 8B and worked fine. I will raise a PR once it passed all tests.

I tested on ARM with centOS and openEuler, and there are not many codes should be added. Pin me if I could offer any help!

from cachelib.

jaesoo-fb avatar jaesoo-fb commented on April 28, 2024

Thanks for the update. We really appreciate if you can submit it as PR.

Just in case, is this related to another issue #276 as well?

from cachelib.

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.