From owner-freebsd-smp Mon Nov 12 7:48:33 2001 Delivered-To: freebsd-smp@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id 24E5F37B4EC for ; Mon, 12 Nov 2001 07:48:09 -0800 (PST) Received: (qmail 27273 invoked from network); 12 Nov 2001 15:48:07 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 12 Nov 2001 15:48:07 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 12 Nov 2001 07:48:04 -0800 (PST) From: John Baldwin To: Hiroharu Tamaru Subject: Re: cpu affinity Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 12-Nov-01 Hiroharu Tamaru wrote: > Hi. > > I was looking for any hack point to set CPU affinity. I > found in version 1.3.2.1 of kern/kern_switch.c (a little > before 4.4R) that it already had "trivial affinity" > implemented in chooseproc(). Is this different from what > you are describing here? or has this disappeared in > -current during the switch to KSE? > > I wanted to have a dedicated dual CPU machine for numerical > calculations with large memory. Since this is a dedicated > machine any hack was fine for me if at all possible. The > machine has not arrived yet, so I haven't tested it yet. > > Can I expect, on 4.4R, to have two calc programs running > (mostly) on their own CPU if I set these two processes at, > say, rtprio (so that the two will live in a seperate group > wrt any other processes)? or I don't even need rtprio? or do > I have everything mixed up? > > Thanks. It might work right in that case. If you only have 1 process, then it tends to bounce back and forth between the CPUs, but if every CPU is loaded and none are idle, you might be able to avoid that problem. > At Sat, 10 Nov 2001 13:27:37 -0800 (PST), > John Baldwin wrote: >> >> >> On 10-Nov-01 Andrew R. Reiter wrote: >> > >> > Do we have planes to implement some sort of mechanism for supporting cpu >> > affinity? That'd be a pretty cool thing to have when 5.0 release time >> > comes around. >> >> In theory that is to be part of KSE where a KSE will choose a thread that >> last >> ran on the current CPU over another thread in the same group. > > -- > Hiroharu Tamaru > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message