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

Add method to obtain useful system hardware information #2181

Closed
boggle opened this Issue Apr 10, 2012 · 7 comments

Comments

Projects
None yet
8 participants
@boggle
Contributor

boggle commented Apr 10, 2012

For implementing a new hash table, I'd like to know the size of cache lines. In general, we probably want a way to provide technical information like that in std (or perhaps even in core). For now, I'm just intending to add a sys info module that will have CACHE_LINE_SIZE and CACHE_LINE_BITS constants. I found some code for this on the internet and would like to know if it is ok LICENSE-wise to put "do-what-you-want-with-it-licensed C bits" like that into rust:

http://stackoverflow.com/questions/794632/programmatically-get-the-cache-line-size

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Apr 11, 2012

Contributor

I have copy-pasted snippets from stackoverflow before and put a link to the source in the comments.

Contributor

brson commented Apr 11, 2012

I have copy-pasted snippets from stackoverflow before and put a link to the source in the comments.

@ghost ghost assigned brson Apr 12, 2012

@pnkfelix

This comment has been minimized.

Show comment
Hide comment
@pnkfelix

pnkfelix Apr 25, 2013

Member

Nominating for milestone.

From reading the milestone descriptions, I suspect it is a match for Maturity Milestone 5: production ready. (One might be more aggressive and try to stuff it in e.g. "feature complete", but since a client should be able to express this themselves in native code as needed, I think it can wait for 5.)

Member

pnkfelix commented Apr 25, 2013

Nominating for milestone.

From reading the milestone descriptions, I suspect it is a match for Maturity Milestone 5: production ready. (One might be more aggressive and try to stuff it in e.g. "feature complete", but since a client should be able to express this themselves in native code as needed, I think it can wait for 5.)

@graydon

This comment has been minimized.

Show comment
Hide comment
@graydon

graydon May 30, 2013

Contributor

just a bug, removing milestone/nomination.

Contributor

graydon commented May 30, 2013

just a bug, removing milestone/nomination.

@bblum

This comment has been minimized.

Show comment
Hide comment
@bblum

bblum Aug 9, 2013

Contributor

I also think it would be useful to have a cacheline-aligned attribute for variables and for struct fields. Possibly even production-ready-worthy. Not sure if there's a separate issue for that; couldn't find one with a cursory search.

Contributor

bblum commented Aug 9, 2013

I also think it would be useful to have a cacheline-aligned attribute for variables and for struct fields. Possibly even production-ready-worthy. Not sure if there's a separate issue for that; couldn't find one with a cursory search.

@huonw

This comment has been minimized.

Show comment
Hide comment
@huonw

huonw Nov 15, 2013

Member

Triage: no progress.

Member

huonw commented Nov 15, 2013

Triage: no progress.

@dan-c-underwood

This comment has been minimized.

Show comment
Hide comment
@dan-c-underwood

dan-c-underwood Apr 2, 2014

I'm willing to take a look at implementing a libsys module to provide hardware information incl. cache (and ideally other information) if this enhancement would still be appreciated?

dan-c-underwood commented Apr 2, 2014

I'm willing to take a look at implementing a libsys module to provide hardware information incl. cache (and ideally other information) if this enhancement would still be appreciated?

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 20, 2015

Member

We're making the standard library smaller and smaller these days. Unless there's a particular reason why this would have to be in the language itself, this should be a Cargo package now.

Member

steveklabnik commented Jan 20, 2015

We're making the standard library smaller and smaller these days. Unless there's a particular reason why this would have to be in the language itself, this should be a Cargo package now.

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