Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2002 07:58:36 -0800
From:      Wes Peters <wes@softweyr.com>
To:        Stephen Montgomery-Smith <stephen@math.missouri.edu>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: running many programs on multiprocessor system
Message-ID:  <3DE248AC.8C54C273@softweyr.com>
References:  <3DE149C7.2030607@math.missouri.edu> <3DE14D21.8070905@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DE248AC.8C54C273>