From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 24 11:45:43 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 D4D66106566B for ; Fri, 24 Feb 2012 11:45:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B84D8FC1A for ; Fri, 24 Feb 2012 11:45:42 +0000 (UTC) Received: by lagz14 with SMTP id z14so3894268lag.13 for ; Fri, 24 Feb 2012 03:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of asmrookie@gmail.com designates 10.152.130.234 as permitted sender) client-ip=10.152.130.234; Authentication-Results: mr.google.com; spf=pass (google.com: domain of asmrookie@gmail.com designates 10.152.130.234 as permitted sender) smtp.mail=asmrookie@gmail.com; dkim=pass header.i=asmrookie@gmail.com Received: from mr.google.com ([10.152.130.234]) by 10.152.130.234 with SMTP id oh10mr1664635lab.35.1330083942131 (num_hops = 1); Fri, 24 Feb 2012 03:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=u0Dr0VmATbfy0qEZ8y2XAMmYZY7kS63rHd31mzVaQ3Y=; b=AAtLoCp/0N3JlvwsehwCpzfCos1yQDXAAbbYd5DUvPUz2I+qJZxqA+4sXMkdyoahr/ z3jilvvGJjpHsV92L8UyngOhxUq9QAu4za2DAy4hUI6QmIdRN0ezxu16Wi2EkqNEdILv YOJv7JyBNUKuSa/6D2Kazdz4A4TThW/l3kVFg= MIME-Version: 1.0 Received: by 10.152.130.234 with SMTP id oh10mr1374305lab.35.1330083942030; Fri, 24 Feb 2012 03:45:42 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.41.5 with HTTP; Fri, 24 Feb 2012 03:45:41 -0800 (PST) In-Reply-To: <4F4772AD.5030406@rdtc.ru> References: <4F4772AD.5030406@rdtc.ru> Date: Fri, 24 Feb 2012 11:45:41 +0000 X-Google-Sender-Auth: YqxmkBE6pgKGSRpnqTVN02n4G4Q Message-ID: From: Attilio Rao To: Eugene Grosbein Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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:45:43 -0000 2012/2/24, Eugene Grosbein : > 28.01.2012 20:22, Attilio Rao =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> 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=3D165444 > A fix has been committed as r230984, it should apply to STABLE_9/8 too, can you try it? Attilio --=20 Peace can only be achieved by understanding - A. Einstein