From owner-freebsd-questions@FreeBSD.ORG Sun Aug 1 18:02:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8F4316A4CE for ; Sun, 1 Aug 2004 18:02:01 +0000 (GMT) Received: from out004.verizon.net (out004pub.verizon.net [206.46.170.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E83A43D62 for ; Sun, 1 Aug 2004 18:02:01 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] ([68.161.100.95]) by out004.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040801180200.SIDP28868.out004.verizon.net@[192.168.1.3]>; Sun, 1 Aug 2004 13:02:00 -0500 Message-ID: <410D300F.5080102@mac.com> Date: Sun, 01 Aug 2004 14:01:51 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Patrick Dung References: <20040731194337.37249.qmail@web51802.mail.yahoo.com> In-Reply-To: <20040731194337.37249.qmail@web51802.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out004.verizon.net from [68.161.100.95] at Sun, 1 Aug 2004 13:02:00 -0500 cc: freebsd-questions@freebsd.org Subject: Re: Curious question about FreeBSD's TCP/IP and SMP locking X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2004 18:02:01 -0000 Patrick Dung wrote: > I am not programmer but I want to know what is the use > of adding so much locks/mutex in the stack? So that it works properly under SMP. Concurrent programming is really hard to do. > Also, would it make a newbie/beginner feel difficult to > understand the code (I mean the TCP/IP part)? Why, yes, certainly it does. Beyond that, the size of the code involved implies something about the complexity: 8-epia# wc -l /usr/src/sys/netinet/tcp_input.c 3349 /usr/src/sys/netinet/tcp_input.c -- -Chuck