Date: Fri, 24 Feb 2012 11:45:41 +0000 From: Attilio Rao <attilio@freebsd.org> To: Eugene Grosbein <egrosbein@rdtc.ru> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel threads inherit CPU affinity from random sibling Message-ID: <CAJ-FndDkmPGBCzwiiusnb4as1eG=QaaT8Tbb9xvDhQsAwhih4A@mail.gmail.com> In-Reply-To: <4F4772AD.5030406@rdtc.ru> References: <CAFMmRNxF1uMOr39BbZkpPN=uM7G09dtcckAYw8ag6n6bi=FeOw@mail.gmail.com> <CAJ-FndDHsQRRNmrS7fsELEVohozWvvfaZ6eW_GipwHdjU9ZwxA@mail.gmail.com> <CAFMmRNyPkwx3hRtraq6QL64kibAeV3W23FE34T1oDnf9SVFOYg@mail.gmail.com> <CAJ-FndD3366-uT191jMva3P-uL0DHi6nFeRfdsKA1hbJW7WqEA@mail.gmail.com> <4F4772AD.5030406@rdtc.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
2012/2/24, Eugene Grosbein <egrosbein@rdtc.ru>: > 28.01.2012 20:22, Attilio Rao =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> 2012/1/28 Ryan Stone <rysto32@gmail.com>: >>> On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao <attilio@freebsd.org> >>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndDkmPGBCzwiiusnb4as1eG=QaaT8Tbb9xvDhQsAwhih4A>