After setting cpu affinity using taskset, why does 'ps' still show process running on cpu outside new affinity?

Solution Verified - Updated -

Issue

  • After setting cpu affinity using taskset, why does 'ps' still show process running on cpu outside new affinity?
# ps -eo pid,psr,comm|grep cat
 2635   3 cat

# taskset -cp 1 2635
pid 2635's current affinity list: 0,3
pid 2635's new affinity list: 1

But 'ps' still shows cpu#3

# ps -eo pid,psr,comm|grep cat
 2635   3 cat

Environment

  • Red Hat Enterprise Linux.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content