From owner-freebsd-smp@FreeBSD.ORG Fri Mar 2 14:37:33 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D53CF16A403 for ; Fri, 2 Mar 2007 14:37:33 +0000 (UTC) (envelope-from keith.arner@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by mx1.freebsd.org (Postfix) with ESMTP id 7FDE013C491 for ; Fri, 2 Mar 2007 14:37:33 +0000 (UTC) (envelope-from keith.arner@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so890638nza for ; Fri, 02 Mar 2007 06:37:33 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=KGZsgqSV8oMLKTDERyorZOHjJTLy5YneLPyfDKqzu1ENPNNKqZ2eqbFwglNj0mJgqmegBForbQ4JfU7irlNDv+IJ4FIgEfzRyQRaBt6pBYuujxkUP1l59ntuBSXjpx/kaMSuWTkhPUnZh1qgXZ2Hv+xaUBGBclCS1LQXkcYv3oc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=Q2mjx/oH6dAVVFn7Dj/YjXXfAub6pknkMKRiABemRz4hPiUFDSwN6SkOfJZQ2tGvwO9ESK04JfIVaz/2K5uSe2iTfV2gscsCWP+x0aQ/BzsnJZ4PrPa0vdIUGnr0uK0fmRmpCkKIIbD36fLKUvIyeOQIgTu7+PVBDqfzlNqCkOI= Received: by 10.64.10.2 with SMTP id 2mr5266109qbj.1172846249825; Fri, 02 Mar 2007 06:37:29 -0800 (PST) Received: by 10.64.201.3 with HTTP; Fri, 2 Mar 2007 06:37:29 -0800 (PST) Message-ID: <8e552a500703020637l2e1d6036h4a975736bdc48914@mail.gmail.com> Date: Fri, 2 Mar 2007 09:37:29 -0500 From: "Keith Arner" Sender: keith.arner@gmail.com To: "Attilio Rao" In-Reply-To: <3bbf2fe10703011211i6b0ad2b6gf75067ca17d0ac3b@mail.gmail.com> MIME-Version: 1.0 References: <8e552a500703010645x61d9b064w21c475ecc00a0e0e@mail.gmail.com> <3bbf2fe10703011211i6b0ad2b6gf75067ca17d0ac3b@mail.gmail.com> X-Google-Sender-Auth: 8cd9a1fad296262d Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-smp@freebsd.org Subject: Re: INP_INFO_WLOCK(&tcbinfo) bottleneck X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 14:37:34 -0000 On 3/1/07, Attilio Rao wrote: > > > Currently, the main problem for this is that somewhere (TM) there > mutex gets recursed and recursion is not handled alredy for rwlocks, > so kernel starts panicing. > > Patch for recursion in rwlock is not trivial, but there are ongoing > discussions on it. > Well, even if the INP_INFO_[RW]LOCK macros were changed to use shared/exclusive locks rather than a mutex, and the sx locks were fixed to be taken recursively, I'm not sure that would really do the trick for parallelism. In tcp_input(), the code is using INP_INFO_WLOCK(), to take an exclusive lock, so only one thread would be able to be in the TCP input code path anyway. Keith