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

WIP: Add support for mbind, get_mempolicy and set_mempolicy #938

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krh
Copy link

@krh krh commented Nov 20, 2023

This adds support for the mbind, set_mempolicy and get_mempolicy NUMA syscalls. The get_mempolicy syscall has a few different modes of operation, depending on the flags, which is demultiplexed into get_mempolicy_node and get_mempolicy_next_node for now. There's a couple of other modes that writes into the variable length bit array, which aren't implemented for now.

krh added a commit to krh/rustix that referenced this pull request Nov 20, 2023
…ealliance#938)

This adds support for the `mbind`, `set_mempolicy` and `get_mempolicy`
NUMA syscalls.  The `get_mempolicy` syscall has a few different modes
of operation, depending on the flags, which is demultiplexed into
`get_mempolicy_node` and `get_mempolicy_next_node` for now.  There's a
couple of other modes that writes into the variable length bit array,
which aren't implemented for now.
@krh krh force-pushed the numa branch 2 times, most recently from 6fe1aa4 to f321b15 Compare November 20, 2023 16:02
@krh krh mentioned this pull request Nov 20, 2023
Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a first glance, this change looks reasonable!

rustix::fs::seek(&alt, rustix::fs::SeekFrom::Current(0)),
Ok(12)
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are mbind.rs~ and main.rs~ editor backups?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, oops, that's emacs backup files.

@krh krh force-pushed the numa branch 3 times, most recently from 097eae4 to 49a7171 Compare November 29, 2023 21:51
@krh
Copy link
Author

krh commented Nov 29, 2023

Pushed a new version: removed the emacs backup files, fixed cargo fmt and warnings about unused imports. Remaining errors look like they're all from missing the new symbols in linux-raw-sys.

@krh
Copy link
Author

krh commented Nov 29, 2023

This one: sunfishcode/linux-raw-sys#96

@krh krh force-pushed the numa branch 2 times, most recently from 52f2271 to 4c5f6ce Compare November 30, 2023 18:20
@sunfishcode
Copy link
Member

If you'd like this PR to be included in the rustix 0.38 series, please use linux-raw-sys 0.4.x. I've now released 0.4.12 with sunfishcode/linux-raw-sys#96. Another option is to open this PR in the 1.0-staging branch.

@krh
Copy link
Author

krh commented Nov 30, 2023

If you'd like this PR to be included in the rustix 0.38 series, please use linux-raw-sys 0.4.x. I've now released 0.4.12 with sunfishcode/linux-raw-sys#96. Another option is to open this PR in the 1.0-staging branch.

Oh, ok, thanks, I'll target 0.4.12 then.

…ealliance#937)

This adds support for the `mbind`, `set_mempolicy` and `get_mempolicy`
NUMA syscalls.  The `get_mempolicy` syscall has a few different modes
of operation, depending on the flags, which is demultiplexed into
`get_mempolicy_node` and `get_mempolicy_next_node` for now.  There's a
couple of other modes that writes into the variable length bit array,
which aren't implemented for now.
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

Successfully merging this pull request may close these issues.

None yet

2 participants