Skip to content

Conversation

@lguohan
Copy link
Contributor

@lguohan lguohan commented Nov 16, 2020

all internal patches will be add below the marker. This eases
internal patch management when public patches change

Signed-off-by: Guohan Lu lguohan@gmail.com

all internal patches will be add below the marker. This eases
internal patch management when public patches change

Signed-off-by: Guohan Lu <lguohan@gmail.com>
@lguohan lguohan requested a review from yxieca November 16, 2020 12:12
@paulmenzel
Copy link
Contributor

Nit: will be added

I wondor if adding a directory patch/internal would be more beneficial, as then people just seeing the directory tree and not having looked at the file patch/series are able to categorize the patches.

@lguohan
Copy link
Contributor Author

lguohan commented Nov 17, 2020

@paulmenzel , for all sonic repos, we have a unified way to introduce additional patch on those repro. The patch will first patch those repros, and then build those repo. In the internal repo, we will then first patch this series file, and then use the patches series file to patch the kernel build.

@paulmenzel
Copy link
Contributor

@paulmenzel, for all sonic repos, we have a unified way to introduce additional patch on those repro. The patch will first patch those repros, and then build those repo. In the internal repo, we will then first patch this series file, and then use the patches series file to patch the kernel build.

Sorry, I do not understand your comment. How does that contradict having a directory patch/internal/…?

@lguohan
Copy link
Contributor Author

lguohan commented Nov 17, 2020

let me try again. so, if we change the sonic-linux-kernel build process and introduce a new directory patch/internal, yes that works. however, such scheme is per-repo basis. for a sonic image, we have other repos which also needs internal patch, and those repros have different build process, having a patch/internal for those repo may not be the best way.

Therefore, we have design a unified way to patch each submodule in sonic-buildimage repo. The assumption of the unified way is not to change build process in each submodule. In this case, we will patch patch/series in sonic-linux-kernel repo.

The unified approach can be found here. https://github.com/Azure/sonic-buildimage/blob/master/slave.mk#L371

Signed-off-by: Guohan Lu <lguohan@gmail.com>
@lguohan lguohan merged commit 8eee9d8 into sonic-net:master Nov 22, 2020
@lguohan lguohan deleted the intbanner branch November 22, 2020 19:08
Kalimuthu-Velappan pushed a commit to Kalimuthu-Velappan/sonic-linux-kernel that referenced this pull request Dec 10, 2020
all internal patches will be added below the marker. This eases
internal patch management when public patches change

Signed-off-by: Guohan Lu <lguohan@gmail.com>
paulmenzel pushed a commit to paulmenzel/sonic-linux-kernel that referenced this pull request Jan 18, 2021
all internal patches will be added below the marker. This eases
internal patch management when public patches change

Signed-off-by: Guohan Lu <lguohan@gmail.com>
dal00 pushed a commit to kamelnetworks/sonic-linux-kernel that referenced this pull request Jul 20, 2025
**What I did**
Correct real time CPU Utilization calculation

**Why I did it**
Now in procdockerstatsd script we iterate all processes every 2 minutes and ingest into state_db, 
https://psutil.readthedocs.io/en/latest/#psutil.cpu_percent, psutil supports both blocking and non-blocking way, and we prefer to use non-blocking way, thus now psutil.cpu_percent() used is to calculate CPU utilization since last time being triggered, current implementation will create new process object in below lines every time:
for process in psutil.process_iter(['pid', 'ppid', 'memory_percent', 'cpu_percent', 'create_time', 'cmdline']):

In order to get correct CPU utilization from last 2 minutes, we need store process object into some variable, so that every iteration will first lookup all_process_obj member and use existing process object, otherwise create new object for further use. And clean up the dead process object in case some process crashes.

**How I verified it**
Verified by UT and will check by ksoftirqd reproduced case.
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.

3 participants