Re: [PATCH] kobject_uevent: add uevent_helper exist check
From: zhoumin
Date: Sun Apr 06 2025 - 02:25:37 EST
Hi Andrew,
Thank you for your feedback.
> Is there any measurable reduction in boot time?
This depends on the number of uevent and the performance of the device.
In fact, I found this issue during a project to optomize boot time,
and on my embedded device, it can be optimized by at least 2 seconds.
> Cached in a static variable. So if a uevent helper later becomes
> available, we won't know that and a reboot will be needed?
The static variable is used to avoid repeatedly checking for uevent_helper
after the rootfs is mounted and uevent_helper is detected.
As for the uevent before the rootfs is mounted, that is another issue.
Whether I submit this patch or not, system always miss these uevent, because
queue is not used to handle this currently. In fact, I have also noticed
this problem, but based on experience, this seems to cause no issue.
> I wonder if this is the official/preferred way of detecting the
presence of a file.
For only checking file existence, kern_path is a sufficiently simple
approach, you can find it in many kernel lookup functions.
Let me know if you have further suggestions.
Best regards,
zhoumin