linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: David Teigland <teigland@redhat.com>
Cc: zkabelac@redhat.com, bmarzins@redhat.com, martin.wilck@suse.com,
	heming.zhao@suse.com, linux-lvm@redhat.com
Subject: Re: [linux-lvm] Discussion: performance issue on event activation mode
Date: Fri, 1 Oct 2021 10:00:32 +0200	[thread overview]
Message-ID: <20211001080032.nzr6i7wewyc6ssin@alatyr-rpi.brq.redhat.com> (raw)
In-Reply-To: <20210930155542.GB32174@redhat.com>

On Thu 30 Sep 2021 10:55, David Teigland wrote:
> On Wed, Sep 29, 2021 at 11:39:52PM +0200, Peter Rajnoha wrote:
> > Hmm, thinking about this, I've just realized one more important and related
> > thing here I didn't realize before - the LVM regex filters! These may contain
> > symlink names as one can find them in /dev. But for those symlinks, we need
> > to be sure that the rules are already applied. This practically means that:
> 
> At least at RH we're enabling the devices file by default (meaning no
> filter) in the same timeframe that we're looking at these activation
> services.  So, I don't think this is a big factor.
> 

OK, if we don't need access to all the aliases (all the symlink names under /dev),
then that's great. We just need to make sure the devices file is then
always used with pvscan called out of the udev rule.

> >   - For non-event-based activation, we need udev-settle (so we're sure
> >     all the rules are applied for all devices we might be scanning).
> > 
> >   - For event-based activation, we need to be sure that we use "RUN"
> >     rule, not any of "IMPORT{program}" or "PROGRAM" rule. The difference
> >     is that the "RUN" rules are applied after all the other udev rules are
> >     already applied for current uevent, including creation of symlinks. And
> >     currently, we have IMPORT{program}="pvscan..." in our rule,
> >     unfortunately...
> 
> That's pretty subtle, I'm wary about propagating such specific and
> delicate behavior, seems fragile.
> 

Yeah, that was just because I didn't realize we don't actually need those
symlinks and the classic filter is ignored in this case. I thought we
had a bug in our current 69-dm-lvm.rules where we call IMPORT{progra}=pvscan
in which case all the symlinks are not created yet. I'm glad it's not
the case.

> > The nodes are already there, the symlinks could be missing because the
> > udev rules haven't been processed yet.
> > 
> > Non-event-based LVM activation needs to wait for settle for sure (because
> > there's full scan across all devices).
> > 
> > Event-based LVM activation just needs to be sure that:
> > 
> >   - the pvscan only scans the single device (the one for which there's
> >     the uevent currently being processed),
> > 
> >   - the pvscan should be called in a way that we have all the symlinks
> >     in place so the regex filter still works for symlinks (== putting
> >     the pvscan onto a RUN exec queue).
> 
> I think we're looking at a udev-settle dependency (or alternative) for all
> cases, best to just make that explicit and consistent, and isolated in one
> place.  I'm not really seeing a downside to that.  Then, focus efforts on
> refining a replacement.  If the subtle dependencies are spread around then
> it's hard to extract and improve the unwanted parts.

So then we can concentrate on minimizing the set of devices we need to
"settle". Right now, I don't see technical obstacles to implementing this,
but the separation of systemd-udev-settle.service into pieces would be a
first step for this to perform better, I think.

The only problematic part here might be systemd/udev's aversion to
anything having "udev-settle" in mind. But I think if we're able to show
them the difference and advantage of using the settle here by presenting
real numbers and analysis, there might be a chance. The separation of
udev-settle into pieces would surely help too, because we could isolate
the settle to devices we're only interested in.

We can surely discuss that with them. Would be great if we find consensus
here on all sides, I don't want to fight with or completely ignore
systemd/udev guys and their optinions...

-- 
Peter

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


  reply	other threads:[~2021-10-01  8:01 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06  6:15 [linux-lvm] Discussion: performance issue on event activation mode heming.zhao
2021-06-06 16:35 ` Roger Heflin
2021-06-07 10:27   ` Martin Wilck
2021-06-07 15:30     ` heming.zhao
2021-06-07 15:45       ` Martin Wilck
2021-06-07 20:52       ` Roger Heflin
2021-06-07 21:30     ` David Teigland
2021-06-08  8:26       ` Martin Wilck
2021-06-08 15:39         ` David Teigland
2021-06-08 15:47           ` Martin Wilck
2021-06-08 16:02             ` Zdenek Kabelac
2021-06-08 16:05               ` Martin Wilck
2021-06-08 16:03             ` David Teigland
2021-06-08 16:07               ` Martin Wilck
2021-06-15 17:03           ` David Teigland
2021-06-15 18:21             ` Zdenek Kabelac
2021-06-16 16:18             ` heming.zhao
2021-06-16 16:38               ` David Teigland
2021-06-17  3:46                 ` heming.zhao
2021-06-17 15:27                   ` David Teigland
2021-06-08 16:49         ` heming.zhao
2021-06-08 16:18       ` heming.zhao
2021-06-09  4:01         ` heming.zhao
2021-06-09  5:37           ` Heming Zhao
2021-06-09 18:59             ` David Teigland
2021-06-10 17:23               ` heming.zhao
2021-06-07 15:48 ` Martin Wilck
2021-06-07 16:31   ` Zdenek Kabelac
2021-06-07 21:48   ` David Teigland
2021-06-08 12:29     ` Peter Rajnoha
2021-06-08 13:23       ` Martin Wilck
2021-06-08 13:41         ` Peter Rajnoha
2021-06-08 13:46           ` Zdenek Kabelac
2021-06-08 13:56             ` Peter Rajnoha
2021-06-08 14:23               ` Zdenek Kabelac
2021-06-08 14:48               ` Martin Wilck
2021-06-08 15:19                 ` Peter Rajnoha
2021-06-08 15:39                   ` Martin Wilck
2021-09-09 19:44         ` David Teigland
2021-09-10 17:38           ` Martin Wilck
2021-09-12 16:51             ` heming.zhao
2021-09-27 10:00           ` Peter Rajnoha
2021-09-27 15:38             ` David Teigland
2021-09-28  6:34               ` Martin Wilck
2021-09-28 14:42                 ` David Teigland
2021-09-28 15:16                   ` Martin Wilck
2021-09-28 15:31                     ` Martin Wilck
2021-09-28 15:56                     ` David Teigland
2021-09-28 18:03                       ` Benjamin Marzinski
2021-09-28 17:42                     ` Benjamin Marzinski
2021-09-28 19:15                       ` Martin Wilck
2021-09-29 22:06                       ` Peter Rajnoha
2021-09-30  7:51                         ` Martin Wilck
2021-09-30  8:07                           ` heming.zhao
2021-09-30  9:31                             ` Martin Wilck
2021-09-30 11:41                             ` Peter Rajnoha
2021-09-30 15:32                               ` heming.zhao
2021-10-01  7:41                                 ` Martin Wilck
2021-10-01  8:08                                   ` Peter Rajnoha
2021-09-30 11:29                           ` Peter Rajnoha
2021-09-30 16:04                             ` David Teigland
2021-09-30 14:41                           ` Benjamin Marzinski
2021-10-01  7:42                             ` Martin Wilck
2021-09-29 21:53                 ` Peter Rajnoha
2021-09-30  7:45                   ` Martin Wilck
2021-09-29 21:39               ` Peter Rajnoha
2021-09-30  7:22                 ` Martin Wilck
2021-09-30 14:26                   ` David Teigland
2021-09-30 15:55                 ` David Teigland
2021-10-01  8:00                   ` Peter Rajnoha [this message]
2021-10-18  6:24                   ` Martin Wilck
2021-10-18 15:04                     ` David Teigland
2021-10-18 16:56                       ` heming.zhao
2021-10-18 21:51                       ` Zdenek Kabelac
2021-10-19 17:18                         ` David Teigland
2021-10-20 14:40                       ` Martin Wilck
2021-10-20 14:50                         ` David Teigland
2021-10-20 14:54                           ` Martin Wilck
2021-10-20 15:12                             ` David Teigland
2021-06-07 16:40 ` David Teigland
2021-07-02 21:09 ` David Teigland
2021-07-02 21:22   ` Martin Wilck
2021-07-02 22:02     ` David Teigland
2021-07-03 11:49       ` heming.zhao
2021-07-08 10:10         ` Tom Yan
2021-07-02 21:31   ` Tom Yan

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=20211001080032.nzr6i7wewyc6ssin@alatyr-rpi.brq.redhat.com \
    --to=prajnoha@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=martin.wilck@suse.com \
    --cc=teigland@redhat.com \
    --cc=zkabelac@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).