From owner-freebsd-current@FreeBSD.ORG Fri Jul 31 18:15:44 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E01351065670; Fri, 31 Jul 2009 18:15:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 40DBA8FC13; Fri, 31 Jul 2009 18:15:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fxm6 with SMTP id 6so288636fxm.43 for ; Fri, 31 Jul 2009 11:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=hWTt7t7lH2EYSZieyit2QI0XP2NxkVUGbjfAOuMeIJ0=; b=xBj3Z/iXcSHwAnAGoGxYBb4mCIhDyUF3K5qZFOoBFSuhc/+liNtbeCzbtsRG6tLOJl RjMZmWhvrSg69LZTRc8gViN55m2xX6VjQ5EVOMyzVPU1rY6a+CpOHIJwlUVeg94YJ+Wr ZpZAl9whUzruVeC56GyOxGxlD9Jn6w94yFRO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=AXoX/WXRaFxVdHCKxGVwUT3tiyQb6PN/N4GaBdHNtrwlUmrpnDrZ5qT+4CRJEM6C9z jJmdtUneTkYgLOt4pfkBloG0jU+IiqQFXfHzY549Y8NkQO3sD1jc3n1CYwMUEbic+XQQ eiwOFikbngSdMTWY/NMUazjC6JLdS/t8OLGmU= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.109.19 with SMTP id h19mr1747696fap.20.1249064140764; Fri, 31 Jul 2009 11:15:40 -0700 (PDT) In-Reply-To: <200907311919.26913.hselasky@c2i.net> References: <3bbf2fe10907310759o3be1f565t4122fcd66c4531f4@mail.gmail.com> <200907311818.08481.hselasky@c2i.net> <3bbf2fe10907310934r640350c6n7ea89d3aaf36a05f@mail.gmail.com> <200907311919.26913.hselasky@c2i.net> Date: Fri, 31 Jul 2009 20:15:40 +0200 X-Google-Sender-Auth: 5f8c9b05d633730f Message-ID: <3bbf2fe10907311115m1fb0fcd9lf630c1224682472d@mail.gmail.com> From: Attilio Rao To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Peter Holm , freebsd-current@freebsd.org Subject: Re: [PATCH] Newbus locking 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: Fri, 31 Jul 2009 18:15:45 -0000 2009/7/31 Hans Petter Selasky : > On Friday 31 July 2009 18:34:26 Attilio Rao wrote: >> 2009/7/31 Hans Petter Selasky : >> > Hi, >> > >> > Speaking about the USB subsystem and newbus: >> >> Hans, >> I wanted to maintain this private to us but you clearly don't >> understand what races live in newbus, what requirements in locking we >> need to protect that and also how a sane locking scheme should be >> built. >> Please drop this conversation. > > Hi, > > I'm not saying that your approach will not work or that it is wrong. I'm > saying that it is not fast enough. Your patch affects the boottime, in a > negative way. > > Sure I can help you eliminate blocking the whole USB explore thread from > newbus_lock(), but there are sometimes also synchronous delay inside device > probe functions, and I think for those cases it would be better if we kept > using Giant, because then all sleep calls have drop- and pickup- Giant code, > but there is no automatic drop and pickup for the newbus_lock()! I already told you several time that USB is not my area of expertise and that: * if there is a real time loss * if the time loss is measurable * if the time loss is a real hurt * assuming we think 1 sec delay at boot is something to care about * assuming the drop/pickup for Giant does introduce race that this patch fixes I would have taken care of the problem None of this point is demostrated. I can't measure a time critical issue, neither other people alredy testing the patch could. Privately you said that my work is old/wrong because just of this thing. I can't accept your critics based on the fact you: * didn't look at the patch at all * didn't look at my locking requirements * didn't look at newbus races * didn't quantify the time loss (if any) Attilio -- Peace can only be achieved by understanding - A. Einstein