From owner-freebsd-hackers@freebsd.org Fri Jan 19 19:03:39 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C227EC2566 for ; Fri, 19 Jan 2018 19:03:39 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id E8CD96FA95 for ; Fri, 19 Jan 2018 19:03:38 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yv.noip.me (c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id w0JJ3bvh044336 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 19 Jan 2018 11:03:37 -0800 (PST) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56] claimed to be yv.noip.me To: Freebsd hackers list From: Yuri Subject: Does the kernel assign CPU affinity automatically? Message-ID: <38c78eec-b598-dc44-8422-ab8fdec0a735@rawbw.com> Date: Fri, 19 Jan 2018 11:03:35 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 19:03:39 -0000 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