Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 13050b7

Browse files
author
lijing0010
authored
Don't set affinity if not necessary (#353)
For non-numa architecture, users can use taskset to specify cores Signed-off-by: Jing Li <[email protected]>
1 parent 4261cbd commit 13050b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/Lib/Codec/EbEncHandle.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,10 @@ void EbSetThreadManagementParameters(
10201020
if (numGroups == 1) {
10211021
EB_U32 lps = configPtr->logicalProcessors == 0 ? numLogicProcessors:
10221022
configPtr->logicalProcessors < numLogicProcessors ? configPtr->logicalProcessors : numLogicProcessors;
1023-
for(EB_U32 i=0; i<lps; i++)
1024-
CPU_SET(lpGroup[0].group[i], &groupAffinity);
1023+
if (configPtr->targetSocket != -1) {
1024+
for(EB_U32 i=0; i<lps; i++)
1025+
CPU_SET(lpGroup[0].group[i], &groupAffinity);
1026+
}
10251027
}
10261028
else if (numGroups > 1) {
10271029
EB_U32 numLpPerGroup = numLogicProcessors / numGroups;

0 commit comments

Comments
 (0)