linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Demi Marie Obenour <demi@invisiblethingslab.com>,
	DeCay <decayhonor@gmail.com>,
	linux-lvm@lists.linux.dev
Subject: Re: LVM2 headers
Date: Thu, 6 Mar 2025 11:36:15 +0100	[thread overview]
Message-ID: <2dfd3cbf-df15-4f69-9710-24520deda633@gmail.com> (raw)
In-Reply-To: <Z8eRZnRMMsz1-slY@itl-email>

Dne 05. 03. 25 v 0:48 Demi Marie Obenour napsal(a):
> On Tue, Mar 04, 2025 at 09:13:54PM +0400, DeCay wrote:
>> Interesting, thank you for your answer! Yes, DBus should work for my
>> use-case.
>>
>> At the same time, I'm looking into lvm2cmd.h right now, but it seems to be
>> designed for the CLI `lvm` you mentioned.
> 
> LVM2 can't be embedded in an application because there are points where
> if LVM crashes, the whole system must be rebooted.  Furthermore, there
> are points where accessing memory that is not mlock'd might hang
> forever.

Yep it's around this logic where lvm2 needs to lock itself into memory
whenever it needs to suspend devices - as this may suspend access to
swap device if such device would be living on currently suspended LV.

There could be possibly some mode where user is 'promising', he is not
using lvm2 on devices he using to run his system - in this case  the
rules might be way more relaxed - but explain all this to all users is 
probably too complex...

> If you plan to frequently perform LVM operations, then LVM is probably
> the wrong tool for the job.  LVM operations often take 0.3 seconds or
> more and are highly disruptive to other I/O on the system.

We are continuously making lvm2 faster but clearly if there is a suspend 
operation that requires to flush all disk IO operation - that may cause a 
significant 'sleep' delay.

On the other hand - if the user does require much higher responsiveness of 
such lvm2 commands - he then needs to significantly reduce  'dirty-page-cache' 
size used by his system - so there are no long flushing delays.

If there are seen more delays for other reason unrelated to suspend IO wait,
I'd like to see them with timed example whether we can run them faster.


Regards

Zdenek


      reply	other threads:[~2025-03-06 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04  8:29 LVM2 headers DeCay
2025-03-04 14:25 ` Zdenek Kabelac
2025-03-04 17:13   ` DeCay
2025-03-04 23:48     ` Demi Marie Obenour
2025-03-06 10:36       ` Zdenek Kabelac [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=2dfd3cbf-df15-4f69-9710-24520deda633@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=decayhonor@gmail.com \
    --cc=demi@invisiblethingslab.com \
    --cc=linux-lvm@lists.linux.dev \
    /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).