From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: linux-hotplug@vger.kernel.org
Subject: Re: replace in-memory rules array with match/action token list
Date: Thu, 23 Oct 2008 16:10:13 +0000 [thread overview]
Message-ID: <4900A1E5.9020604@tuffmail.co.uk> (raw)
In-Reply-To: <4900419F.7010405@tuffmail.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
Kay Sievers wrote:
> On Thu, Oct 23, 2008 at 16:16, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
>
>> Kay Sievers wrote:
>>
>>> On Thu, Oct 23, 2008 at 13:34, Alan Jenkins <alan-jenkins@tuffmail.co.uk> 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
[-- Attachment #2: 70-persistent-net.rules --]
[-- Type: text/plain, Size: 972 bytes --]
# 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"
next prev parent reply other threads:[~2008-10-23 16:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 9:19 replace in-memory rules array with match/action token list Alan Jenkins
2008-10-23 11:34 ` Alan Jenkins
2008-10-23 12:47 ` Kay Sievers
2008-10-23 14:16 ` Alan Jenkins
2008-10-23 14:36 ` Kay Sievers
2008-10-23 16:10 ` Alan Jenkins [this message]
2008-10-23 19:09 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4900A1E5.9020604@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).