From owner-freebsd-hackers Fri Jun 29 21:35:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id 5969B37B403; Fri, 29 Jun 2001 21:35:27 -0700 (PDT) (envelope-from eddy+public+spam@noc.everquick.net) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.10.2/8.10.2) with ESMTP id f5U4ZOG18906; Sat, 30 Jun 2001 04:35:24 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Sat, 30 Jun 2001 04:35:23 +0000 (GMT) From: "E.B. Dreger" To: "Michael C . Wu" Cc: Matthew Rogers , freebsd-smp@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: CPU affinity hinting In-Reply-To: <20010629214443.A69846@peorth.iteration.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Fri, 29 Jun 2001 21:44:43 -0500 > From: Michael C . Wu > > The issue is a lot more complicated than what you think. How so? I know that idleproc and the new ipending / threaded INTs enter the picture... and, after seeing the "HLT benchmark" page, it would appear that simply doing nothing is sometimes better than doing something, although I'm still scratching my head over that... > This actually is a big issue in our future SMP implementation. I presumed as much; the examples I gave were trivial. I also assume that memory allocation is a major issue... to not waste time with inter-CPU locking, I'd assume that memory would be split into pools, a la Hoard. Maybe start with approx. NPROC count equally-sized pools, which are roughly earmarked per hypothetical process. For example: If MAXUSERS=80 --> NPROC=1300, a machine with 256 MB might use 192 kB initial granularity for mmap() requests, giving 128 MB to each processor as a first approximation. Now, no locking is needed on mmap() until a given CPU's "pool" hits low water, and steals from another pool. This would hopefully be infrequent, particularly assuming that memory allocations would be distributed roughly equally between CPUs. I'm assuming that memory allocations are 1:1 mappable wrt processes. Yes, I know that's faulty and oversimplified, particularly for things like buffers and filesystem cache. > There are two types of processor affinity: user-configurable > and system automated. We have no implementation of the former, Again, why not "hash(sys_auto, user_config) % NCPU"? Identical processes would be on same CPU unless perturbed by user_config. Collisions from identical user_config values in unrelated processes would be less likely because of the sys_auto pertubation. Granted: It Is Always More Complicated. (TM) But for a first pass... > and alfred-vm has a semblance of the latter. Please wait > patiently..... Or, if impatient, would one continue to brainstorm, not expect a response (i.e., not get disappointed when something basic is posted), and track -current after the destabilization? :-) Eddy --------------------------------------------------------------------------- Brotsman & Dreger, Inc. EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence --------------------------------------------------------------------------- Date: Mon, 21 May 2001 11:23:58 +0000 (GMT) From: A Trap To: blacklist@brics.com Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to , or you are likely to be blocked. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message