Re: replace in-memory rules array with match/action token list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kay Sievers wrote:
> On Thu, Oct 23, 2008 at 16:16, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote:
>   
>> Kay Sievers wrote:
>>     
>>> On Thu, Oct 23, 2008 at 13:34, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote:
>>>       
>>>> Alan Jenkins wrote:
>>>>
>>>>         
>>>>>> The in-memory rule array of a common desktop distro install took:
>>>>>>   1151088 bytes
>>>>>> with the token list:
>>>>>>   109232 bytes tokens (6827 * 16 bytes), 71302 bytes buffer
>>>>>>
>>>>>>             
>>>>> Sounds great from a performance point of view.
>>>>>           
>
>   
>> It's still takes over five times
>> as long, but I can't see anything unexpected happening.
>>     
>
> Are you sure, you don't log/print debug messages somewhere?  We got a
> few more dbg() messages in the code.
>
> Kay
>   

No.  I've done that before, and the messages ended up in
/var/log/daemon.log.  I checked it in case there were errors, and I
didn't see any debug messages there.  Oprofile said that most of the
time was in udevd, and it wasn't in a debug function.


Actually, the biggest increase was in "system" time.  read_hpet was the
top entry at 6%, hrtimers featured heavily in general, and I traced it
back to sys_nanosleep().  Which I thought might implicate
wait_for_file...  Hmm.  There's also a call usleep() in rename_netif(). 
Perhaps this error message is significant:

    "error changing netif name ath0 to ath1: Device or resource busy"

It only happens with the bad version.  The good version doesn't try to
rename the interface from "ath0".  I've attached my rules file.


But this error should cause rename_netif() to return without calling
usleep().  The only other high-res sleep in udevd is the usleep() in
wait_for_file().

And anticipating your next question:

    # grep WAIT /etc/udev/rules.d/*
    /etc/udev/rules.d/05-udev-early.rules:ACTION=="add",
KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"


So I have two identifiables

 1)  The attached rules are being interpreted differently, changing the
name of the device.

 2)  wait_for_file is causing a lot more overhead for some reason.


Thanks
Alan
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x168c:0x001c (ath_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:15:af:87:43:9f", ATTRS{type}=="1", NAME="ath0"

# USB device 0x069a:0x0318 (cdc_ether)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1b:9e:19:45:8f", ATTR{type}=="1", NAME="eth0"

# PCI device 0x1969:0x2048 (atl2)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1f:c6:28:b4:f7", ATTR{type}=="1", NAME="eth1"

# USB device 0x:0x (cdc_ether)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:9e:19:45:8f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x168c:0000:01:00.0 (ath5k_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:af:87:43:9f", ATTR{type}=="1", KERNEL=="ath*", NAME="ath1"

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux