Skip to content

WIP: online cpu can be bind by sched_getaffinity()#1883

Draft
lhanjian wants to merge 8 commits intoalibaba:masterfrom
lhanjian:worker_cpu_affinity
Draft

WIP: online cpu can be bind by sched_getaffinity()#1883
lhanjian wants to merge 8 commits intoalibaba:masterfrom
lhanjian:worker_cpu_affinity

Conversation

@lhanjian
Copy link
Copy Markdown
Collaborator

@lhanjian lhanjian commented Nov 3, 2023

nginx's automatic core binding will only bind the cores sequentially from head to tail, and will not obtain the current online cpu.

https://forum.nginx.org/read.php?29,279564,279569#msg-279569

Similar needs and discussions in the nginx community

@chobits chobits marked this pull request as draft November 3, 2023 14:07
@chobits
Copy link
Copy Markdown
Member

chobits commented Nov 3, 2023

I convert this PR to draft. There are some compilation error found by test cases. If your pr is ready to review, click ready to review in this page.

@chobits chobits self-requested a review November 3, 2023 14:09
Comment thread auto/unix Outdated
Comment thread src/core/nginx.c Outdated
Comment thread src/os/unix/ngx_getaffinity.c Outdated
@chobits chobits requested a review from drawing November 3, 2023 14:17
@chobits
Copy link
Copy Markdown
Member

chobits commented Nov 3, 2023

TODO: also need to create documentation for this feature

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.

2 participants