Skip to content

udevd: Optimize "goto"

Alan Jenkins linux-hotplug 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2udevd: trivial cleanup in udev_rules_iterudev/udev_rules_parse.c+3 -30 replies
2/2udevd: Avoid repeated scans for goto targets (udev_iter_find_label)udev/udev_rules.c udev/udev_rules.h udev/udev_rules_parse.c+45 -121 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] udevd: Optimize "goto"

I seem to remember you mentioned this as a longer-term goal. This was in the context of the TODO item "rework rules to a match-action list, instead of a rules array".

The idea was to move the scan for the label targeted by a goto rule (udev_rules_iter_label), from run-time to parse-time. It avoids repeating the scan for every event.

I already had a patch for this specific idea. I think it can be implemented now without causing problems. It's no big win - cachegrind suggests it takes 5% off user cpu time - but it is progress.