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

Enhance measuring accuracy #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Enhance measuring accuracy #2

wants to merge 2 commits into from

Conversation

cgxu519
Copy link
Contributor

@cgxu519 cgxu519 commented Sep 6, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

There is a memory leak in the error path of trace_irqoff_init(),
so fix it properly.

Signed-off-by: Chengguang Xu <[email protected]>
In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.

Signed-off-by: Chengguang Xu <[email protected]>
@smcdef
Copy link
Collaborator

smcdef commented Dec 6, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

The timer is implemented base on the softirq. The
tasklet is also based on it. So there is no difference
between them. Thanks.

@smcdef
Copy link
Collaborator

smcdef commented Dec 6, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

The timer is implemented base on the softirq. The
tasklet is also based on it. So there is no difference
between them. Thanks.

It looks like that we can make the code simply. Right?

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 6, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

The timer is implemented base on the softirq. The
tasklet is also based on it. So there is no difference
between them. Thanks.

Yes, two approaches are very similar. However, I think timer depends HZ
and hard to measure the time period under 1ms in practical environment.

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 6, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

The timer is implemented base on the softirq. The
tasklet is also based on it. So there is no difference
between them. Thanks.

It looks like that we can make the code simply. Right?

hmm, maybe. The only concern is that tasklet approach may sightly
change the behaviour of softirq handling so sometimes it mitigates the
softirq latency especially when softirq is handled by ksoftirqd.

Copy link
Collaborator

@smcdef smcdef left a comment

Choose a reason for hiding this comment

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

It seems no memleak. What I missed?

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 6, 2020

It seems no memleak. What I missed?

It seems to forget releasing percpu val in error case, Am I missing something?

@smcdef
Copy link
Collaborator

smcdef commented Dec 6, 2020

It seems no memleak. What I missed?

It seems to forget releasing percpu val in error case, Am I missing something?

Great. I see now. Thanks. Can you split those 2 commits to 2 mr? So that I can
merge this one firstly.

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 6, 2020

It seems no memleak. What I missed?

It seems to forget releasing percpu val in error case, Am I missing something?

Great. I see now. Thanks. Can you split those 2 commits to 2 mr? So that I can
merge this one firstly.

Sure, will update shortly.

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 6, 2020

It seems no memleak. What I missed?

It seems to forget releasing percpu val in error case, Am I missing something?

Great. I see now. Thanks. Can you split those 2 commits to 2 mr? So that I can
merge this one firstly.

I've made new PR for memory leak, I'll make another PR after that get merged.

@cgxu519
Copy link
Contributor Author

cgxu519 commented Dec 31, 2020

In order to enhance measuring accuracy, we use tasklet
instead of timer in the case of detecting softirq off.
Meanwhile, fix a memleak in error path.

The timer is implemented base on the softirq. The
tasklet is also based on it. So there is no difference
between them. Thanks.

It looks like that we can make the code simply. Right?

So is there a plan to apply this change in the future?

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