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

arm64: Add irq aff change check #150

Merged
merged 1 commit into from Mar 17, 2020
Merged

arm64: Add irq aff change check #150

merged 1 commit into from Mar 17, 2020

Conversation

@liuchao173
Copy link
Contributor

liuchao173 commented Mar 11, 2020

For aarch64, the PPIs format in /proc/interrputs can be parsed and add to interrupt db, and next, the number of interrupts is counted and used to calculate the load. Finally these interrupts maybe scheduled between the NUMA domains.

Acctually, the PPIs cannot change aff, and it should not be added to interrupt db. This patch fix it.

Add a check before add a interrupt to db, just only reads the irq's aff, and write it back to avoid any impact on the system, According to the result of writing to fitler the irq.

Copy link
Contributor

nhorman left a comment

I think you missed part of your patch set (perhaps you didn't add them to the index prior to committing them to git). You've defined two functions, but not called them from anywhere else in the code, so this patch does nothing

classify.c Show resolved Hide resolved
procinterrupts.c Outdated Show resolved Hide resolved
@liuchao173 liuchao173 force-pushed the liuchao173:master branch from 069e21d to 55294ce Mar 12, 2020
ret = -1;
goto out;
}

This comment has been minimized.

Copy link
@nhorman

nhorman Mar 12, 2020

Contributor

How does this even work? I don't see how being unable to read the smp_affinity of an irq results in deciding that its unchangeable. If the smp_affinity is unchangeable, it will either sink the write operation and succeed, but not change the contents, or the file will have no writable permissions. Either way, a failure to read shouldn't have any bearing on its ability to have its affinity set

classify.c Show resolved Hide resolved
procinterrupts.c Outdated Show resolved Hide resolved
file = fopen(buf, "r+");
if (!file)
return -1;

This comment has been minimized.

Copy link
@nhorman

nhorman Mar 12, 2020

Contributor

Failure to open the file as r+ could mean many things. It could mean you're running irqbalance as non-root users. You need to be careful with this.

procinterrupts.c Outdated Show resolved Hide resolved
@liuchao173 liuchao173 force-pushed the liuchao173:master branch from 55294ce to c7cde61 Mar 13, 2020
irqbalance.h Outdated Show resolved Hide resolved
@liuchao173 liuchao173 force-pushed the liuchao173:master branch 4 times, most recently from fba98b0 to 72be3af Mar 16, 2020
classify.c Outdated Show resolved Hide resolved
@liuchao173 liuchao173 force-pushed the liuchao173:master branch from 72be3af to c2edd66 Mar 17, 2020
For aarch64, the PPIs format in /proc/interrputs can be parsed and add to interrupt db, and next, the number of interrupts is counted and used to calculate the load. Finally these interrupts maybe scheduled between the NUMA domains.

Acctually, the PPIs cannot change aff, and it should not be added to interrupt db. This patch fix it.

Add a check before add a interrupt to db, just only reads the irq's aff, and write it back to avoid any impact on the system, According to the result of writing to fitler the irq.
@liuchao173 liuchao173 force-pushed the liuchao173:master branch from c2edd66 to 55c5c32 Mar 17, 2020
@nhorman nhorman merged commit 0348a3b into Irqbalance:master Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.