From owner-freebsd-stable Mon Nov 25 7:59: 8 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D1A837B401 for ; Mon, 25 Nov 2002 07:59:06 -0800 (PST) Received: from softweyr.com (softweyr.com [209.63.227.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC59E43EBE for ; Mon, 25 Nov 2002 07:59:05 -0800 (PST) (envelope-from wes@softweyr.com) Received: from homer.softweyr.com ([204.68.178.39] helo=softweyr.com) by softweyr.com with esmtp (Exim 3.35 #1) id 18GLdN-0008CI-00; Mon, 25 Nov 2002 08:58:53 -0700 Message-ID: <3DE248AC.8C54C273@softweyr.com> Date: Mon, 25 Nov 2002 07:58:36 -0800 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Stephen Montgomery-Smith Cc: freebsd-stable@FreeBSD.ORG Subject: Re: running many programs on multiprocessor system References: <3DE149C7.2030607@math.missouri.edu> <3DE14D21.8070905@math.missouri.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Stephen Montgomery-Smith wrote: > > Stephen Montgomery-Smith wrote: > > > I have a dual Athlon MP 2100+. If I run three computationally intensive > > programs, one program runs at 99% CPU usage, and the other two run at > > 50% CPU usage (this is according to top). > > > > It used to be that each of the three programs ran at 66% CPU. I liked > > it better the old way. > > > > I spent a couple of weeks thinking about this before posting. And then right > after posting, I realise the difference between these programs and other > programs I run - these programs were written in assembler. > > I have also noticed that threaded programs don't thread properly if one of the > threads calls a subroutine that is written in assembler. > > Sorry about the noise - but if anyone can explain to me why this happens I would > appreciate it. Wow. This reminds me of a favorite Ashleigh Brilliant quote: "While I have no help to offer, I certainly admire the problem." You might want to look at the code that gcc generates and make your assembler subroutines look more like them, especially the function entry and exit routines. I can't imagine why that would make a difference in threading, but it's a place to start. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message