From owner-freebsd-virtualization@FreeBSD.ORG Sat Jun 13 10:33:43 2015 Return-Path: Delivered-To: freebsd-virtualization@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DEBC46C for ; Sat, 13 Jun 2015 10:33:43 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06B4869F for ; Sat, 13 Jun 2015 10:33:43 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: by oial131 with SMTP id l131so996334oia.3 for ; Sat, 13 Jun 2015 03:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=xUxMFkRNKdX70O+GtqxwaSvqphKC6LUt5dWH3oahgxM=; b=e9GAB4KfFG9ICh/0GHHD14C+UF0EzkneM4nHf7STYo0KjP9wt6niunuJXvunpf9dwN kYEK6gmQtNCF9DNSWApTKrAW8oJRoqoIp1HKzJ3WzyjeftpWZPCV+Rq5M1+EWaQGr5V9 zcSU4AqJrhMnL+uTNh6KIXL/PXUfKTfJ+NsU21or1pwI98VLLzr/B/FU6LlwDBbHWoHs ZEda/XIZndKuoSqu118HjpVIevvQQMw3ri7X/71ecwLoWhZz6ZnFdz9Gp61L2OjRjAe5 atMebMRfZDnsE3dYt3Wa5Y3d5evzGfPzZdWj9lwAqShPZbOcDZVzHQ8mFAhG+LlBarWG PN+A== MIME-Version: 1.0 X-Received: by 10.60.79.97 with SMTP id i1mr2319649oex.44.1434191622298; Sat, 13 Jun 2015 03:33:42 -0700 (PDT) Received: by 10.60.82.168 with HTTP; Sat, 13 Jun 2015 03:33:42 -0700 (PDT) Date: Sat, 13 Jun 2015 13:33:42 +0300 Message-ID: Subject: How to bind a thread to a CPU? From: Stefan Andritoiu To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 10:33:43 -0000 Hi, How can I pin a thread to run only on a specific CPU? Is it enough just to set the "struct cpuset *td_cpuset" of the thread? Thank you, Stefan