dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: dm-devel@redhat.com, Andy Grover <agrover@redhat.com>
Subject: Re: dm-delay: Add a message to change delay
Date: Tue, 1 Sep 2015 09:09:35 -0400	[thread overview]
Message-ID: <20150901130934.GA14882@redhat.com> (raw)
In-Reply-To: <20150901121427.GA2906@redhat.com>

On Tue, Sep 01 2015 at  8:14am -0400,
Vivek Goyal <vgoyal@redhat.com> wrote:

> On Mon, Aug 31, 2015 at 10:02:33PM -0700, Andy Grover wrote:
> > On 08/31/2015 07:05 PM, Vivek Goyal wrote:
> > >On Mon, Aug 31, 2015 at 02:24:36PM -0700, Andy Grover wrote:
> > >>This enables runtime modification of the read and write delay values.
> > >>
> > >>Make sure if the delay time is reduced to flush currently-delayed
> > >>bios first, to maintain ordering.
> > >>
> > >>Signed-off-by: Andy Grover <agrover@redhat.com>
> > >>---
> > >>  Documentation/device-mapper/delay.txt |  8 +++++++
> > >>  drivers/md/dm-delay.c                 | 42 +++++++++++++++++++++++++++++++++++
> > >>  2 files changed, 50 insertions(+)
> > >>
> > >>diff --git a/Documentation/device-mapper/delay.txt b/Documentation/device-mapper/delay.txt
> > >>index 15adc55..9e80751 100644
> > >>--- a/Documentation/device-mapper/delay.txt
> > >>+++ b/Documentation/device-mapper/delay.txt
> > >>@@ -10,6 +10,14 @@ Parameters:
> > >>  With separate write parameters, the first set is only used for reads.
> > >>  Delays are specified in milliseconds.
> > >>
> > >>+Message Interface
> > >>+-----------------
> > >>+The delay target will accept a message of the following format:
> > >>+
> > >>+set_delay <read_delay> [<write_delay>]
> > >>+
> > >
> > >Hi Andy,
> > >
> > >So if I want to change only write_delay and keep read_delay same, how do
> > >I do that. Do I have to keep track of existing delay values in user space
> > >and pass same value in read_delay to achieve this.
> > >
> > >Thanks
> > >Vivek
> > 
> > Hi Vivek,
> > 
> > Yes I suppose userspace would either need to remember read_delay so as to
> > not change it while setting write_delay, or I guess it could read the
> > existing values by getting table status before sending the message. Is this
> > reasonable, or do you think it would be better to, say, have separate
> > messages for setting the two values, or some other message style?
> 
> Ideally I think we should have those --key=value type of arguments which
> we don't have yet. So that option is not feasible I guess.
> 
> If latest values are readable from status, then I think single message
> sounds reasoanble to me.

As Zdenek already effectively said: there is no need for this patch.
You don't need to use a message when a table reload would suffice to
change the parameter that is already passed on the table ctr.

Any layer that would be trained to send a message can just as easily be
trained to reload the table to achieve the same result.

  reply	other threads:[~2015-09-01 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 21:24 [PATCH] dm-delay: Add a message to change delay Andy Grover
2015-09-01  2:05 ` Vivek Goyal
2015-09-01  5:02   ` Andy Grover
2015-09-01 12:14     ` Vivek Goyal
2015-09-01 13:09       ` Mike Snitzer [this message]
2015-09-01 14:17         ` Andy Grover
2015-09-01  8:55 ` [PATCH] " Zdenek Kabelac

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=20150901130934.GA14882@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agrover@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=vgoyal@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).