hardkernel / linux

Linux kernel source tree
Other
427 stars 406 forks source link

[n2] [4.9.185] read from /proc fs change process cpu affinity #379

Closed svn78 closed 1 year ago

svn78 commented 4 years ago

Hi!

That might be a minor problem but any reading from /proc on odroid-n2 affects process cpu affinity. E.g this simple app prints following:

user@odroid-n2:~ $ taskset 1 ./mini Check initial affinity cpu count = 1 Open and read /proc/cpuinfo Check affinity again cpu count = 6

Couldn't it point to any cores management issue?

uname -a: Linux odroid-n2-03 4.9.185-44 #1 SMP PREEMPT Wed Jul 31 23:50:32 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

mattgruenke commented 1 year ago

After fixing the call to open() (see my comment, on that gist containing the source), I'm not seeing this behavior on kernel odroid 4.9.333-25. For me, it shows 1 both before & after reading /proc/cpuinfo.

I'm not sure if the problem was somehow related to your failed call, or maybe just fixed in the 4.9.333 kernel.

svn78 commented 1 year ago

Unfortunately I have no access to the board anymore with reported kernel version. But can confirm the problem has gone on recent release. Actually with kernel update a lot of problem with usage of JVM has gone as well.