Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Aug 2009 20:34:55 +0200
From:      Attilio Rao <attilio@freebsd.org>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Peter Holm <pho@freebsd.org>, Giovanni Trematerra <giovanni.trematerra@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: [PATCH] Newbus locking
Message-ID:  <3bbf2fe10908011134h760f1c37y694acd8f37c120e6@mail.gmail.com>
In-Reply-To: <200908010630.21366.hselasky@c2i.net>
References:  <3bbf2fe10907310759o3be1f565t4122fcd66c4531f4@mail.gmail.com> <200907311919.26913.hselasky@c2i.net> <4e6cba830907311917j5d3c0eb6u7f7b1099d3acd504@mail.gmail.com> <200908010630.21366.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/1 Hans Petter Selasky <hselasky@c2i.net>:
> On Saturday 01 August 2009 04:17:42 Giovanni Trematerra wrote:
>> > On Fri, Jul 31, 2009 at 7:19 PM, Hans Petter Selasky<hselasky@c2i.net>
>> > wrote:
>> >
>> >
>> > 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.
>>
>> I tested a patch for a while. I didn't notice any slow down in boot time.
>> Well, I haven't measured it but I can't see any noticeable difference
>> even booting from an USB key.
>
> Hi,
>
> We are talking about some seconds. Store the "ticks" varible in "usb_attach()"
> in sys/dev/usb/controller/usb_controller.c and print out the difference every
> time "usb_bus_explore()" is called having "if (bus->bus_roothold != NULL)".

So, thanks to the precious help of Peter Holm I worked on this patch
fixing 3 problems reported by Peter and addressing the Hans' concern:
now newbus lock is not held for the whole duration of explore handler,
but just acquired and released when needed (really modifying the
newbus subtree). I think it can also be faster than the Giant version
now.
New patch is here:
http://www.freebsd.org/~attilio/Yahoo/newbus/newbus_locking4.diff

Please let me know if you can note any regressions.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



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