Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More info on lock status #30

Open
PeterIvanov opened this issue Mar 30, 2012 · 3 comments
Open

More info on lock status #30

PeterIvanov opened this issue Mar 30, 2012 · 3 comments

Comments

@PeterIvanov
Copy link

Currenty there is little info about what's going on, apart from logging. That one is useful, but, yet again, we use log4j logging, so java.util.logging doesn't cope well.

Info that is currently logged but not accessible in interface:

  • cpus isolation info (are isolated cpus assignable, or all of them from 1 to N are just assumed to be)
  • binding info - success/failure, thread-to-cpu relation
  • binding status (I fugured out that AffinityLock instance fields may be used to deduce this info, but more direct way would be better)

Thank you.

@peter-lawrey
Copy link
Owner

It is intended that only isolated cpus are assignable, or the cpus you specify on the command line.

If you have no isolated cpus, it assumed, you will use any available.

It will log whether a thread acquires a cpu or not. You can imply whether its was successful by looking at the cpu id which is negative on a failure.

@PeterIvanov
Copy link
Author

Well, yes, it is possible to imply, but I fear that this value may mean something else, say, in future versions. I would prefer to just use some interface method for that purpose.

The same goes with isolation info. For instance, I would prefer not to use LockSupport at all if cpu isolation is not set up in the system for some reason. Currently your lib has this info, but does not provide it directly, so user must either receive it by other means, or imply.

@peter-lawrey
Copy link
Owner

A method could be added which returns a boolean. I can do that this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants