From owner-freebsd-arch@FreeBSD.ORG Fri Feb 14 22:08:47 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 65C42DFC for ; Fri, 14 Feb 2014 22:08:47 +0000 (UTC) Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E81331BB7 for ; Fri, 14 Feb 2014 22:08:46 +0000 (UTC) Received: by mail-ee0-f47.google.com with SMTP id d49so5900750eek.20 for ; Fri, 14 Feb 2014 14:08:39 -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=D6/BAheko3zijfo+zJbs/3UvzngaykW0h1HWOqOH22g=; b=MiWULXupVGt0owzmVT9EGjmBjF5DPcCXs4G22zNmNa2QOV/6g3VttCjrE+2pJgXgWv 61TtZm8gA6R0d3+Hnmb0lByNCddHWuNCBg2x1UxCw7XkcfN7ajfMXCXrqowtSInKDFoZ y1dR6Rp1O6CqRSE62rXN6Iq2o6FnlGzCHHtdQvZSariZMGKOTz+TqK9eo1QP6NRaZL5q B5+Na7G+lXuOwSIPkGnYrFw9Ra+xeRRBLi4DO6I3j8HRYeYFwJJ9aRE4V9ic1UGrCx/z QkZv/8+9yRlLCZ4FuGtwtk9UXoefgzdto8fBlwRvMx0e5babNdW3NcyNxsmyD79EIdbA UMQw== X-Gm-Message-State: ALoCoQmpgcY9qB/SLc4HKUYnvNa40cyw6yF9ONXq39Co6C/EsuZ6aQF/8K6KcO4ehjLN6TH53H6N X-Received: by 10.14.203.197 with SMTP id f45mr2188243eeo.90.1392415719153; Fri, 14 Feb 2014 14:08:39 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id y47sm24635115eel.14.2014.02.14.14.08.38 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 14:08:38 -0800 (PST) Message-ID: <52FE93E6.6030705@freebsd.org> Date: Sat, 15 Feb 2014 02:08:38 +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: <201402141318.44743.jhb@freebsd.org> <52FE5FBF.3090104@freebsd.org> <201402141410.29325.jhb@freebsd.org> In-Reply-To: <201402141410.29325.jhb@freebsd.org> X-Enigmail-Version: 1.7a1pre Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" , Adrian Chadd , Ryan Stone , "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: Fri, 14 Feb 2014 22:08:47 -0000 On 14.02.2014 23:10, John Baldwin wrote: >> Due to this bug, not fixed yet, the real picture is more complex: >> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/163585 > > Eh, that bug report has no useful details, as in, it doesn't list the > actual commands run. If you do 'cpuset -l 6 -s 1' to force all > processes to only use CPU6, then yes, of course the other CPUs are idle > because that's what you _asked_ for. AFAICT, that is all the original > reporter did. At work we regularly add and remove CPUs from the > default set (set 1) on hundreds of machines every day with ULE without > any issues. Probably original report lack certain commands, but I provide the link to the port which reproduces this bug too. All threads there are assigned to the _different_ CPUs and appears as result on single one with SCHED_ULE (not with SCHED_4BSD). And it is what original reporter mean too. It surely happens, maybe not the first time, but on 2nd-3rd. It means that cpuset_setaffinity() is completely broken form SCHED_ULE at least for 3 years. -- http://ache.vniz.net/