From owner-freebsd-smp Sun Oct 20 13:11:28 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75F9A37B401 for ; Sun, 20 Oct 2002 13:11:27 -0700 (PDT) Received: from mrslate.anderson.ucla.edu (mrslate.anderson.ucla.edu [164.67.163.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E1B543E6E for ; Sun, 20 Oct 2002 13:11:27 -0700 (PDT) (envelope-from jros@anderson.ucla.edu) Received: (from nobody@localhost) by mrslate.anderson.ucla.edu (8.11.6/8.11.6) id g9KKBQw14284; Sun, 20 Oct 2002 13:11:26 -0700 (PDT) X-Authentication-Warning: mrslate.anderson.ucla.edu: nobody set sender to jros@anderson.ucla.edu using -f To: freebsd-smp@FreeBSD.org Subject: Question on porting freebsd smp Message-ID: <1035144686.3db30dee79f4c@webmail.anderson.ucla.edu> Date: Sun, 20 Oct 2002 13:11:26 -0700 (PDT) From: jros@anderson.ucla.edu Cc: jros@anderson.ucla.edu MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.8 X-Originating-IP: 208.178.183.62 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 Hi all, I have been working on porting the tcp/ip freebsd 4.5 to user space. My idea is to have a piece of code that i can run in many different architectures. So far i have succeded to have freebsd tcp/ip (the complete networking suite) running on Linux user space, windows user space and metaware (i am today running an over-weekend stress test with 1000 http connections on the linux user space and so far so good). Eventually i will do measures of tcp/ip performance for my research so that would be my contribution back to the community that i am hoping. I am actually pleased to work with freebsd code, it is very well written and a lot of fun. I want to go one step further and test the multiprocessor capabilities of the code. So far i have been able to succeed on my own on the port, but in order to speed me up, i was really hoping if i could get some insights fromthe freebsd team. For instance, the ip routing table needs to be locked if several cpus are to share it, which is the case under the smp escenario. I think that if i can get to know where the hardware dependable instruction that takes care of the locks for smp is, then it should be hopefully straightforward for me to go and port that instruction to a linux user space lock instruction of my own. Then i could virtually simulate in user space the smp capabilities using threads sharing the same memory space. So one generic question is: can somebody tell me what do i need in order to do a port of the freebsd smp? If that is too generic... maybe we can start with more especific questions: What compiler flags do i need to set to enable smp? Is there a centralized lock that i can just go and port? Is there a unique lock for smp or are there many locks? if many, where are they defined? Any other parameters that i should be aware of? (I am using freebsd 4.5) I think that should be enough for me to get started. Thanks so much! Jordi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message