Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2003 17:04:53 -0600
From:      Jon Dugan <jdugan@ncsa.uiuc.edu>
To:        freebsd-net@freebsd.org
Subject:   MT/MP locking and TCP
Message-ID:  <20030219230453.GA3167@ncsa.uiuc.edu>

next in thread | raw e-mail | index | archive | help
  I have been spending quite a lot of time rooting through the TCP
  implementation recently due to my efforts with Web100.

  I have been trying to understand the locking strategy in the TCP portions of
  the code.  I have primarily been looking at tcp_input.c.  It seems like
  several variables are locked for the vast majority of the time in
  tcp_input().  (In particular tcbinfo and inp).  This was problematic when I
  called a function to update some stats when a TCP session entered the
  ESTABLISHED state because witness kept telling me that the we might sleep with
  tcpinfo and inp locked.

  Can someone briefly explain the strategy here?  Or maybe there is a document
  somewhere that would be helpful?  (I looked but didn't find anything.)

  I have very little experience with locking and multithreaded programming, so
  that may be the root of my confusion.  As a result I want to make sure as I
  go forward with the Web100 code that I lock it appropriately.

  Thanks,

Jon
-- 
Jon Dugan             |  Senior Network Engineer, NCSA Network Research
jdugan@ncsa.uiuc.edu  |  269 CAB, 605 E Springfield, Champaign, IL 61820
217-244-7715          |  http://www.ncsa.uiuc.edu/~jdugan/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030219230453.GA3167>