[PATCH 0/8] Various large optimisations

Rob Taylor rob.taylor at codethink.co.uk
Mon Nov 19 11:38:46 PST 2007


Rob Taylor wrote:
> Danny Kukawka wrote:
>> On Montag, 19. November 2007, Richard Hughes wrote:
>>> On Mon, 2007-11-19 at 11:55 -0500, Doug Klima wrote:
>>>> Rob Taylor wrote:
>>>>>  4) Allow hotplug events to process in parallel. This intruduces into
>>>>> HAL a similar parallel event processing method as udev. Along with 2),
>>>>> this removes the coldplug memory peak almost entirely (Cutting down to
>>>>> 350K on my intel hardware and about 150K on an N800)
>>> Be careful with this. I had big problems with this a few months ago with
>>> coldplug ordering issues - I'm sure the list has all the juicy details.
>> I would also assume we get (many) regressions with this change.
> 
> Well, I didn't do this code blindly! I've tested on all the hardware I
> own to check that there's no differences in the device database. Its
> also uses pretty much the same logic as udev.
> 
> I agree that it needs testing on more systems, but just throwing up our
> hands and going 'oooh! scary!' wont help that....
> 
> Any volunteers for testing?
> 

Update: Kay's pointed out the scsi_debug module to me, so I can test
with more storage devices (these demonstrated the biggest problems so
far in getting this patch right)

Thanks,
Rob

> 
>>>>>  5) Add the ability in HalDeviceStore to index given properties by
>>>>> value. Profiling showed that about 20% of coldplug time was spend in
>>>>>  hal_device_store_match_key_value_string to look up devices by
>>>>> sysfs_path. This generic patch cuts each lookup to a couple of hash
>>>>> table lookups, versus n strcmps.
>>> Can't we just hardcode sysfs path?
>> How this? IMO we don't speak about /sys, but about the indivdual path of the 
>> devices.
>>
> 
> Yes, there's nothing to hardcode here. The lookup could have been made
> specific to sysfs_path, but it seemed nicer to me to add a generic value
> indexing facility, and very little extra overhead (a hash table lookup
> in a hash table of one ;))
> 
> Thanks,
> Rob
> 
>> Danny
>>
>> _______________________________________________
>> hal mailing list
>> hal at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/hal
> 
> 


-- 
Rob Taylor, Codethink Ltd. -  http://codethink.co.uk


More information about the hal mailing list