From owner-freebsd-current@FreeBSD.ORG Thu Jan 11 16:12:27 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4B7616A412 for ; Thu, 11 Jan 2007 16:12:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id 3680013C455 for ; Thu, 11 Jan 2007 16:12:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id k27so919131nfc for ; Thu, 11 Jan 2007 08:12:25 -0800 (PST) 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:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=EG96YMjL62OX5NGTA+sx0RRdNAHzvh1pbF339L+unHNbeNwqZzE7+uOQMLXPj3bDxgTcXZ6cuiwkAupGzVZqMbkWfPHl1UfgV3t4k5nCWxHv13BKfVaHAwGgeur6r7RqN4hToR26AN3rBnq1DTKBYe9C4fL4yZ8mj/b6k28hciY= Received: by 10.48.48.13 with SMTP id v13mr2228568nfv.1168530291495; Thu, 11 Jan 2007 07:44:51 -0800 (PST) Received: by 10.48.238.9 with HTTP; Thu, 11 Jan 2007 07:44:51 -0800 (PST) Message-ID: <3bbf2fe10701110744r26f7f3cfve073f7154ab8a48d@mail.gmail.com> Date: Thu, 11 Jan 2007 16:44:51 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "John Baldwin" In-Reply-To: <200701101431.57695.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070107171034.GA13836@crodrigues.org> <20070110142100.G52843@fledge.watson.org> <45A5004B.6090402@cisco.com> <200701101431.57695.jhb@freebsd.org> X-Google-Sender-Auth: 94752195f1fa8d5e Cc: Craig Rodrigues , Randall Stewart , freebsd-current@freebsd.org, Robert Watson Subject: Re: Witness warning with SCTP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2007 16:12:27 -0000 2007/1/10, John Baldwin : > On Wednesday 10 January 2007 10:03, Randall Stewart wrote: > > Robert/All: > > > > Ok, here is the deal... I have looked in a bit > > closer at this.. > > > > Here is what is happening... > > > > When a cookie arrives, we get a "create lock" on > > the socket this prevents the user on the same > > socket from creating a assoc at the same exact time. > > Can't you do a model like this: > > lock(); > if (need to create pcb) { > unlock(); > create_pcb(); // can sleep w/o holding lock > lock(); > if (someone else created the pcb) > free(pcb_I_just_created); > } > unlock(); But it is quite impossible to get rid of M_WAITOK in this case (IIUC, this should be the sleeping point)? Attilio -- Peace can only be achieved by understanding - A. Einstein