From: zhoumin <teczm@foxmail.com>
To: akpm@linux-foundation.org
Cc: dakr@kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, rafael@kernel.org,
teczm@foxmail.com, viro@zeniv.linux.org.uk
Subject: Re: [PATCH] kobject_uevent: add uevent_helper exist check
Date: Sun, 6 Apr 2025 14:19:15 +0800 [thread overview]
Message-ID: <tencent_474AC55ADEE443D037337A9ED09422D8C408@qq.com> (raw)
In-Reply-To: <20250405155207.aac347bcdc56e43cb0cae3cb@linux-foundation.org>
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
next prev parent reply other threads:[~2025-04-06 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 17:31 zhoumin
2025-04-05 22:52 ` Andrew Morton
2025-04-06 6:19 ` zhoumin [this message]
2025-04-07 7:01 ` Greg KH
2025-04-07 7:00 ` Greg KH
2025-04-07 15:18 ` zhoumin
2025-04-07 15:35 ` Greg KH
2025-04-07 16:22 ` zhoumin
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=tencent_474AC55ADEE443D037337A9ED09422D8C408@qq.com \
--to=teczm@foxmail.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®