Code Monkey home page Code Monkey logo

Comments (10)

peter-lawrey avatar peter-lawrey commented on August 20, 2024

These are good points. I don't have access to a 32-bit machine so I haven't been able to test it. The JVM_SHARED_LIB would need to change for 32-bit systems, it needs to be amd64 for 64-bit Intel system. (And something else again for Sparc etc)

The warnings are valid, but shouldn't be a problem for 32-bit systems and the address should be a 32-bit value in the first place.

Can you try running the AffinityLockTest in your IDE/command line and giving me the full output so I can see why its failed?

from java-thread-affinity.

peter-lawrey avatar peter-lawrey commented on August 20, 2024

Can you check the JNA implementation works for you? (Even if the native one doesn't compile

I have changed

JVM_SHARED_LIBS := -L$(JAVA_HOME)/jre/lib/amd64/server -L$(JAVA_HOME)/jre/lib/i386/server

so it shouldn't matter whether you have an amd64 or i386 system.

from java-thread-affinity.

isopov avatar isopov commented on August 20, 2024

It seems that they both failed due to the isue #10, but now they both erorr due to

jCaused by: java.lang.ArrayIndexOutOfBoundsException: 2
at vanilla.java.affinity.AffinityLock.cpuLayout(AffinityLock.java:68)
at vanilla.java.affinity.AffinityLock.(AffinityLock.java:53)
... 24 more

EDIT: Maybe that should be disscused in #10. Code tries to take from array using core id as index, while core id is 2 and array of locks is 2x2

from java-thread-affinity.

peter-lawrey avatar peter-lawrey commented on August 20, 2024

I have had to change the data structure this uses so that cores ids are not continuous.

Have test this change locally. Thank you for testing it on a i3.

from java-thread-affinity.

isopov avatar isopov commented on August 20, 2024

If you need confirmation - this issue is resolved for me.

from java-thread-affinity.

peter-lawrey avatar peter-lawrey commented on August 20, 2024

Confirmation is appreciated as I can only test it so much with the system I have.

from java-thread-affinity.

akerbos avatar akerbos commented on August 20, 2024

I know this is a hassle, but maybe you can use virtual machines to perform basic portability tests?

from java-thread-affinity.

peter-lawrey avatar peter-lawrey commented on August 20, 2024

The problem with virtual machines is that they have virtual CPU environment and affinities, or done provide information that a real system will (because its not a real CPU layout)

To work around this I have loaded the cpuinfo from an assortment of machine.

Using a virtual machine would be useful for testing windows, and I have plans to set up much a system.

Its much easier for me, for people to report issues and even provide fixes and I am more than happy for people to improve the library.

from java-thread-affinity.

akerbos avatar akerbos commented on August 20, 2024

I see your point. I was not suggesting you should deeply test your library on a multitude of systems. Building it should work on the major operating system flavors, though, and that you can easily test in virtual machines.

from java-thread-affinity.

peter-lawrey avatar peter-lawrey commented on August 20, 2024

I have tested it builds and works on a Windows 7 64-bit laptop and a Ubuntu 11 and Centos 6 machine.

from java-thread-affinity.

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.