Does the kernel assign CPU affinity automatically?

Michael Zhilin mizhka at gmail.com
Fri Jan 19 19:36:54 UTC 2018


Hi Yuri,

May be just ULE?
https://www.usenix.org/legacy/event/bsdcon03/tech/full_papers/roberson/roberson.pdf

"The primary goal of ULE on SMP is to prevent unnecessary CPU migration
while making good use of available CPU resources. The notion of trying to
schedule threads onto the last CPU that they were run on is commonly called
CPU affinity. It is important to balance the cost of migrating a CPU with
the cost of leaving a CPU idle. "

Best regards,
 Michael.

On Fri, Jan 19, 2018 at 10:03 PM, Yuri <yuri at rawbw.com> wrote:

> I noticed that my particularly large process always runs on the same CPU
> through its lifetime (based on top). This process doesn't use cpuset(1) or
> cpuset(2), and cpuset(1) only shows the all-inclusive set:
>
> $ cpuset -g -p 11511
> pid 11511 mask: 0, 1, 2, 3, 4, 5, 6, 7
>
> Does the kernel assign CPU affinity automatically in some cases? There
> seems to be some factor besides 'cpuset' that determines affinity.
>
>
>
> Thanks,
>
> Yuri
>
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list