From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 19 14:35:26 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 8B96B8BD for ; Wed, 19 Feb 2014 14:35:26 +0000 (UTC) Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19AB91C54 for ; Wed, 19 Feb 2014 14:35:25 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id d10so407086eaj.32 for ; Wed, 19 Feb 2014 06:35:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=W0US+w0x6u6POCX2XTbaBmHCHIP5dBWyf5nzM/WiwuA=; b=H1jA+dcI+ztaGUYXVNytudK2W4hWm7AmShKAyQyIJuqianynAuyiUaZVtqaJTp8ADb OcoJF2BkBLtUQx0h6R1M6DagS5KcGKX0Dfmu2w7mogaeh18Q1+BXFnvXCwZbxInHD1xi R0gjnxS1Wv5smNXXAOXOuapiu5bHgh48tzgmRsykGqANM/ciidfOrep6uln+PGQKgEY0 sTINyK2BzSbG97uwtMLUj7thIu+5y3n3uNl1KQMNRaNWM22CafCmxNn7T/GjHXAADBRN 2PXAS/ND3YNWSKVQNkA9+B7WPvGsUPZW8U5sXuLozq+wZ2H0ozm3l9tzmels5bI2eqUf t43Q== X-Gm-Message-State: ALoCoQldK7ZZJcik9ax3vMUHsAKOnAsyJSXbIQlnZnsjYYvlcM4rNjiNWJGI/IMNNsas2WYmZN5w X-Received: by 10.15.98.68 with SMTP id bi44mr15243103eeb.67.1392820143279; Wed, 19 Feb 2014 06:29:03 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id j42sm1290703eep.21.2014.02.19.06.29.02 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Feb 2014 06:29:02 -0800 (PST) Message-ID: <5304BFAD.50502@freebsd.org> Date: Wed, 19 Feb 2014 18:29:01 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: can the scheduler decide to schedule an interrupted but runnable thread on another CPU core? What are the implications for code? References: <20140215001100.GS34851@funkthat.com> <52FED14E.50304@freebsd.org> <201402181442.36380.jhb@freebsd.org> In-Reply-To: <201402181442.36380.jhb@freebsd.org> X-Enigmail-Version: 1.7a1pre Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" , Andriy Gapon , "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: Wed, 19 Feb 2014 14:35:26 -0000 On 18.02.2014 23:42, John Baldwin wrote: > Eh, no. CPU_WHICH_CPUSET changes the global set that the thread belongs to. > t is not per proceses or per thread. Unless you are explicitly creating > new global sets, your thread belongs to the default set (set 1), and this > call is changing the default set (set 1) to only use a single CPU. This > affects all processes in the machine that do not have their own sets. > Thanx for detailed explanation. According to it, SCHED_ULE does the right thing for such CPU_WHICH_CPUSET call, while SCHED_4BSD does not. Is recent r260043 supposed to fix the problem for SCHED_4BSD or is it unrelated? I can't check it by myself yet. -- http://ache.vniz.net/