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

VirtualAlloc and affinity settings #71

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

Conversation

ami-GS
Copy link
Contributor

@ami-GS ami-GS commented Sep 5, 2024

Move from xdp-for-windows to here

Copy link
Member

@nibanks nibanks left a comment

Choose a reason for hiding this comment

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

Please add some tests for these new functions.

Comment on lines +641 to +642


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

nit: only 1 trailing blank newline

Comment on lines +639 to +640


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

nit: only 1 trailing blank newline

inline
BOOLEAN
CxPlatSetThreadNodeAffinity(
LONG NodeAffinity
Copy link
Member

Choose a reason for hiding this comment

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

Let's not use Windows style all caps types like LONG.

Suggested change
LONG NodeAffinity
uint32_t NodeAffinity

Comment on lines +630 to +635
GROUP_AFFINITY group = {0};

group.Mask = CpuAffinity;
group.Group = (USHORT)GroupNumber;

KeSetSystemGroupAffinityThread(&group, NULL);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
GROUP_AFFINITY group = {0};
group.Mask = CpuAffinity;
group.Group = (USHORT)GroupNumber;
KeSetSystemGroupAffinityThread(&group, NULL);
GROUP_AFFINITY group = { (KAFFINITY)CpuAffinity, GroupNumber, 0 };
KeSetSystemGroupAffinityThread(&group, NULL);

Copy link
Member

Choose a reason for hiding this comment

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

And make the similar changes to user mode.

@nibanks nibanks added the enhancement New feature or request label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants