All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: drew@moseleynet.net,
	Dragos-Marian Panait <dragos.panait@windriver.com>,
	Claudius Heine <ch@denx.de>,
	OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH] rng-tools: Change "Requires" to "WantedBy" for dev-hwrng.device
Date: Fri, 19 Aug 2022 09:24:01 -0700	[thread overview]
Message-ID: <CAMKF1srJc15E8H_3KoHX_DgCu8ZC=60ZL-zn79qYxkiXj3sd2w@mail.gmail.com> (raw)
In-Reply-To: <CANNYZj_4qaeiqQNR=-CuOPkOXyxP3Nz24wBWpCXhsLZNwBT5HA@mail.gmail.com>

On Fri, Aug 19, 2022 at 8:22 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> So which recent patch? Can you link to it please?
>

https://patchwork.yoctoproject.org/project/oe-core/patch/20220813170156.4040589-1-raj.khem@gmail.com/

but this needs to remove sysinit from target, I have meant to send a
v2 but had no time to do so far.

> Alex
>
>
> On Fri, 19 Aug 2022 at 17:13, Drew Moseley <drew.moseley@gmail.com> wrote:
> >
> >
> > On 8/19/22 11:07 AM, Dragos-Marian Panait wrote:
> >
> >
> > On 19.08.2022 17:34, Drew Moseley wrote:
> >
> > [Please note: This e-mail is from an EXTERNAL e-mail address]
> >
> >
> > On 8/19/22 8:50 AM, Dragos-Marian Panait wrote:
> >
> > Hi Claudius,
> >
> > On 19.08.2022 12:36, Claudius Heine wrote:
> >
> > [Please note: This e-mail is from an EXTERNAL e-mail address]
> >
> > Hi Dew.
> >
> > On 2022-08-15 20:25, drew.moseley@gmail.com wrote:
> >
> > From: Drew Moseley <drew@moseleynet.net>
> >
> > The previous change to remove the dependency on systemd-udev-settle
> > caused boot delays at least on qemu. It seems that change required
> > a hwrng device but that's not necessarily available on all platforms.
> >
> > This changes the "Requires" to a "WantedBy" as modeled after the
> > version of this file on Ubuntu 20.04.
> >
> > Signed-off-by: Drew Moseley <drew@moseleynet.net>
> > ---
> >   meta/recipes-support/rng-tools/rng-tools/rng-tools.service | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-support/rng-tools/rng-tools/rng-tools.service b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service
> > index 0f50890dcb..b013d95932 100644
> > --- a/meta/recipes-support/rng-tools/rng-tools/rng-tools.service
> > +++ b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service
> > @@ -3,8 +3,6 @@ Description=Hardware RNG Entropy Gatherer Daemon
> >   DefaultDependencies=no
> >   After=systemd-udev-settle.service
> >   Before=sysinit.target shutdown.target
> > -Requires=dev-hwrng.device
> > -After=dev-hwrng.device
> >   Conflicts=shutdown.target
> >
> >   [Service]
> > @@ -32,3 +30,4 @@ SystemCallFilter=@system-service
> >
> >   [Install]
> >   WantedBy=sysinit.target
> > +WantedBy=dev-hwrng.device
> >
> >
> > This looses the order. Have you tried just replacing `Requires` with
> > `Wants`. So something like this:
> >
> >
> > ```
> >
> > Before=sysinit.target shutdown.target
> > Wants=dev-hwrng.device
> > After=dev-hwrng.device
> > Conflicts=shutdown.target
> >
> > ```
> >
> > If that still would cause the long waiting time on qemu?
> >
> > I haven't investigated the qemu issue, but maybe qemu just doesn't
> > provide a hardware random source? If it doesn't provide a hardware
> > random source, then installing rng-tools on there might also not make sense.
> > Alternatively maybe just adding a start timeout might solve it?
> > regards,
> > Claudius
> >
> >
> > I've tested the patch on a NUC7, results are the same as with qemu:
> > - increased boot time
> > - timeout for rng-tools.service
> > [ TIME ] Timed out waiting for device /dev/hwrng.
> > [DEPEND] Dependency failed for Hard…e RNG Entropy Gatherer Daemon.
> >
> > Regards,
> > Dragos
> >
> >
> > Interesting. I guess this patch should definitely be ignored and the patch from Khem that removes both the dev-hwrng and systemd-udev-settle depencies is the right approach. That means that the original problem that adding systemd-udev-settle was meant to solve, is no longer solved but it seems that the proposed solutions here have adverse effects elsewhere.
> >
> > Simply removing the systemd-udev-settle dependency fixes the issue that my customer has that caused me to start investigating here.
> >
> > Drew
> >
> > --
> > mailto:drew@moseleynet.net
> >
> > Sorry for the confusion, I did not test any additional patches/changes that have been suggested in this email thread.
> > My test was performed on current Yocto master sources. No additional patches.
> > I just wanted to inform that the boot delay is also observed on real hw, not just qemu.
> > Again, sorry for the confusion.
> >
> > Dragos
> >
> >
> > Sorry for adding to the confusion. My point was intended to be that I am fairly certain the recent patch submitted by Khem will resolve the boot delay issue you are having as well as the original boot delay caused by systemd-udev-settle.
> >
> > Drew
> >
> > --
> > mailto:drew@moseleynet.net
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#169634): https://lists.openembedded.org/g/openembedded-core/message/169634
> > Mute This Topic: https://lists.openembedded.org/mt/93042904/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


      reply	other threads:[~2022-08-19 16:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17  8:08 [PATCH] rng-tools: add systemd-udev-settle wants to service Claudius Heine
2022-02-02 12:38 ` [OE-core] " Kyle Russell
2022-02-02 13:08   ` Claudius Heine
2022-02-02 16:26     ` Kyle Russell
2022-02-03  8:35       ` Claudius Heine
2022-02-03 14:12         ` Kyle Russell
2022-07-21 15:17           ` Drew Moseley
2022-07-21 15:29             ` Khem Raj
2022-07-22 20:42               ` Drew Moseley
2022-07-23  0:30                 ` [OE-core] " Khem Raj
2022-07-23  7:03               ` Claudius Heine
2022-07-26 13:17                 ` [OE-core][PATCH] rng-tools: Replace obsolete "wants systemd-udev-settle" drew.moseley
2022-08-01 18:44                   ` Drew Moseley
2022-08-02  7:24                     ` Claudius Heine
2022-08-02  7:47                       ` Khem Raj
2022-08-04 15:09                         ` [OE-core][PATCH v2] " drew.moseley
2022-08-12 12:59                           ` Dragos-Marian Panait
2022-08-12 15:20                             ` Drew Moseley
2022-08-15 18:25                               ` [OE-core][PATCH] rng-tools: Change "Requires" to "WantedBy" for dev-hwrng.device drew.moseley
2022-08-15 18:29                                 ` Drew Moseley
2022-08-15 18:47                                   ` Khem Raj
2022-08-18 17:12                                     ` Alexander Kanavin
2022-08-19  9:36                                 ` Claudius Heine
2022-08-19 12:50                                   ` Dragos-Marian Panait
2022-08-19 14:34                                     ` Drew Moseley
2022-08-19 15:07                                       ` Dragos-Marian Panait
2022-08-19 15:13                                         ` Drew Moseley
2022-08-19 15:21                                           ` Alexander Kanavin
2022-08-19 16:24                                             ` Khem Raj [this message]

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='CAMKF1srJc15E8H_3KoHX_DgCu8ZC=60ZL-zn79qYxkiXj3sd2w@mail.gmail.com' \
    --to=raj.khem@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=ch@denx.de \
    --cc=dragos.panait@windriver.com \
    --cc=drew@moseleynet.net \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.