From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 24 11:21:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537891065670; Fri, 24 Feb 2012 11:21:19 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id AA28D8FC14; Fri, 24 Feb 2012 11:21:18 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q1OBLHXO081913; Fri, 24 Feb 2012 18:21:17 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <4F4772AD.5030406@rdtc.ru> Date: Fri, 24 Feb 2012 18:21:17 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: Attilio Rao References: In-Reply-To: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 24 Feb 2012 12:10:09 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel threads inherit CPU affinity from random sibling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 11:21:19 -0000 28.01.2012 20:22, Attilio Rao пишет: > 2012/1/28 Ryan Stone : >> On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao wrote: >>> I think what you found out is very sensitive. >>> However, the patch is not correct as you cannot call >>> cpuset_setthread() with thread_lock held. >> >> Whoops! I actually discovered that for myself and had already fixed >> it, but apparently I included an old version of the patch in the >> email. >> >>> Hence this is my fix: >>> http://www.freebsd.org/~attilio/cpuset_root.patch >> >> Oh, I do like this better. I tried something similar myself but >> abandoned it because I misread how sched_affinity() was implemented by >> 4BSD(I had gotten the impression that once TSF_AFFINITY is set it >> could never be cleared). > > Do you have a pathological test-case for it? Are you going to test the patch? I have the pathological test-case for it: http://www.freebsd.org/cgi/query-pr.cgi?pr=165444 Eugene Grosbein