From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 14 17:55:05 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B8135BC; Fri, 14 Feb 2014 17:55:05 +0000 (UTC) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C63C714B0; Fri, 14 Feb 2014 17:55:04 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id w7so20684898qcr.28 for ; Fri, 14 Feb 2014 09:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bjmYs8IWxXTAY/Adfo+BHnmFW552Egd/N3gmaf2V0MI=; b=NykmRvtWx1snhjJvcyRxii/54BtRZKYfkDCyrvo9i6vqO/alk1+yy3NutonXZWiRnl GgCFuBJhRFMmQnoC0D3rcgH/Xp7Nt3/G7CSNxyxcmf1zyjw1ftQBlnRtgNmg2fb3mRHB /WA/4j+vmT3A49WSrV3UeLzD+WY71cQKZxgUnqRrEoWRzq7aUGGomuNvdA2EWlSTS3c1 9V9+GgpuYdQNQq9EuY0b00PY/S3A7PrWHonmrzQD2dk78S++9Sq6dFkhpJI5jP5AKyhc HrVe66T3Ezj4iC9nUK4zDIBQaIb1GFsxwBtmuZpiolMpPX5F0mlGeWMsLE6VJyokWrO+ 3qFg== MIME-Version: 1.0 X-Received: by 10.224.11.136 with SMTP id t8mr15755403qat.26.1392400503873; Fri, 14 Feb 2014 09:55:03 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.16.10 with HTTP; Fri, 14 Feb 2014 09:55:03 -0800 (PST) In-Reply-To: <201402141139.49158.jhb@freebsd.org> References: <201402141139.49158.jhb@freebsd.org> Date: Fri, 14 Feb 2014 09:55:03 -0800 X-Google-Sender-Auth: CZZ-aGEmfEN_lLThkm6dptv_s7U Message-ID: Subject: Re: can the scheduler decide to schedule an interrupted but runnable thread on another CPU core? What are the implications for code? From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-hackers@freebsd.org" , Ryan Stone , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 17:55:05 -0000 On 14 February 2014 08:39, John Baldwin wrote: > On Friday, February 14, 2014 4:22:34 am Adrian Chadd wrote: >> Ok, so now I remember the other odd thing. >> >> I was seeing the sending context(s) jumping from one CPU to another >> during flowtable_insert_common(), around the locking bits. >> >> But I thread pinned all the sender user threads! >> >> So, why would the senders still be scheduled on other CPUs if I've >> pinned the userland threads? >> >> (and yes, I verified that the userland threads weren't moving around.) > > Can you clarify a bit? It's not clear how sender thraeds differ from > userland threads differ from sender user threads. (I.e. one reading > is that these are all the same thing and should thus all be pinned > (I assume you mean using cpuset to bind them to specific cores rather > than sched_pin)) Yup, I'm doing a manual, poor-mans RSS in lieu of merging in roberts stuff: * the userland threads are using the cpuset call to map a thread into a cpuset, yes * the NIC TX/RX ring routines in cxgbe are pinned to the same CPU as the userland threads -a