[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_474AC55ADEE443D037337A9ED09422D8C408@qq.com>
Date: Sun, 6 Apr 2025 14:19:15 +0800
From: zhoumin <teczm@...mail.com>
To: akpm@...ux-foundation.org
Cc: dakr@...nel.org,
gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org,
rafael@...nel.org,
teczm@...mail.com,
viro@...iv.linux.org.uk
Subject: Re: [PATCH] kobject_uevent: add uevent_helper exist check
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
Powered by blists - more mailing lists