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

improve efficiency to avoid unnecessary system calls #2460

Closed
wants to merge 1 commit into from

Conversation

eryx
Copy link

@eryx eryx commented Nov 9, 2018

Ⅰ. Describe what this PR did

cache the kernel version-info and improve syscall efficiency (in some special cases, reduce CPU load about 12%)

Ⅱ. Does this pull request fix one issue?

fixes #2459

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Nov 9, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@4237a68). Click here to learn what that means.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2460   +/-   ##
=========================================
  Coverage          ?   69.02%           
=========================================
  Files             ?      277           
  Lines             ?    18296           
  Branches          ?        0           
=========================================
  Hits              ?    12629           
  Misses            ?     4243           
  Partials          ?     1424
Flag Coverage Δ
#criv1alpha1test 31.6% <76.47%> (?)
#criv1alpha2test 35.76% <76.47%> (?)
#integrationtest 40.42% <76.47%> (?)
#nodee2etest 33.11% <76.47%> (?)
#unittest 26.68% <76.47%> (?)
Impacted Files Coverage Δ
pkg/kernel/kernel.go 80% <76.47%> (ø)

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pouchrobot
Copy link
Collaborator

@eryx Thanks for your contribution. 🍻
Please sign off in each of your commits.

@pouchrobot
Copy link
Collaborator

We found this is your first time to contribute to Pouch, @eryx
👏 We really appreciate it.
Just remind that you have read the contribution guide: https://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md
If you didn't, you should do that first. If done, welcome again and please enjoy hacking! 🍻

@eryx
Copy link
Author

eryx commented Nov 9, 2018

kexec case!

@eryx eryx closed this Nov 9, 2018
@houstar
Copy link
Contributor

houstar commented Nov 9, 2018

@eryx Maybe you can add cache-flush time like that,

cache-flush-time = 5 min

I encourage you to freely talk to others and make your mind matter 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate and unnecessary system call in pkg/kernel/GetVersionInfo()
4 participants