From owner-freebsd-arch@FreeBSD.ORG Wed Feb 19 14:29:11 2014 Return-Path: Delivered-To: freebsd-arch@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 05B7C69A for ; Wed, 19 Feb 2014 14:29:11 +0000 (UTC) Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8866E1B9F for ; Wed, 19 Feb 2014 14:29:10 +0000 (UTC) Received: by mail-ee0-f50.google.com with SMTP id d17so272145eek.9 for ; Wed, 19 Feb 2014 06:29:03 -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=Spoti5jWl4iTnnNyeTPs25qXaxiCvS+r3v6zq4ggMatnHWzZdGL+tTslxCVYRIyLJP iMTJXFtovlYi2upX2G9Lnc4ji1ddm0m9xon1gHY+ELrSTFdAVlxR1E+rRwYDZ7tT6Q70 Bj0UP72m012jcjvtPtupw7o9YK7/1w67FgJcmWOgw1ZDkTj7Uoo/y/dSwTvqOQevQse1 weIUeE90cG1QWDEig8ZkJY/EKzF9i447/Vre2dePNinEs6AOIeQu+Qb1a6XTKwXFvJAT XJgMZG0n/rFqnfrz5QqWfsLyLHRFLVyC2KvKFcQ4TIBMQXThHqBKuZ1LQacmrYpSXE9d qj9A== X-Gm-Message-State: ALoCoQmh5Y/orAVBGXvPY0RtONd2ynSDL6xFpTi+eusoQUU/HhEZ3jhJNgfaV8Z+cNfhNZpeXkZi 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-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 14:29:11 -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/