linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Christoph Hellwig <hch@lst.de>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH V3 0/7] nvmet: add target ns revalidate support
Date: Thu, 23 Apr 2020 01:20:25 -0700	[thread overview]
Message-ID: <3f112b29-91cc-620c-6262-de3e322a29fc@grimberg.me> (raw)
In-Reply-To: <BYAPR04MB4965850E7D094ED44D1C360786D30@BYAPR04MB4965.namprd04.prod.outlook.com>


> A. Regarding host querying information :-
> 
> That means host needs to query id-ns periodically to have correct
> size for the block device, until then it will have wrong size
> (unless it calls ns-scan) which will break the host software assumption
> about block device mapped on the namespace. See [1].
> 
> Isn't calling id-ns for size validation also defeats the purpose of
> whole AEN mechanism that we have implemented for host/target and
> present in the spec ?
> 
> B. Regarding Overhead :-
> 
> Can you please explain what exactly the overhead is ?
> 
> With my understanding :-
> 
> As mentioned in the cover letter this design provides
> a mechanism (since it is a driver feature) and not the policy,
> so it doesn't force any particular behavior onto user, i.e.
> users can adjust tunables provided for this feature and use
> feature the way they want it or even disable it and rely on host
> based periodic id-ns-size-change-rescan sequence.
> 
> Overhead in terms of design :-
> We can change the current polling so that instead of scanning all the
> susbys/ns then sleep, we scan in batch (N namespaces) for each poll.
> 
> Overhead is in terms of code then we can :-
> 1. Move core.c maintenance thread related code into separate file,
>      (name suggestions are welcome).
> 2. Add Kconfig options to enable/disable this feature for target.
> 
> In case of performance :-
> 1. User should apply policy based on their requirement through
>      tuneables since different users can have different
>      machine/platforms/environment.

This is cumbersome in my mind... and the polling part is
kinda bothering me...

I still think that having this sit in userspace is so much more
elegant really.

A simple service that watches with inotify on the device_paths (files or
bdevs - which are also files) and trigger revalidate via configfs when
it gets an attrib event.

We can even have it watch configfs and automatically add watchers
when new namespaces are enabled and remove watchers when namespaces are
disabled, so it can be completely zero touch.

This can sit as a simple systemd service that nvmetcli installs.

I'd very much prefer this over the proposed approach...

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-04-23  8:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19 23:48 [PATCH V3 0/7] nvmet: add target ns revalidate support Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 1/7] nvmet: add ns revalidation support Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 2/7] nvmet: add global thread for ns-resize AEN Chaitanya Kulkarni
2020-04-27 14:19   ` Hannes Reinecke
2020-04-19 23:48 ` [PATCH V3 3/7] nvmet: export resize thread enable-disable attr Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 4/7] nvmet: export resize thread scan interval Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 5/7] nvmet: export resize thread sched attributes Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 6/7] nvmet: export ns resize monitor attribute Chaitanya Kulkarni
2020-04-19 23:48 ` [PATCH V3 7/7] nvmet: add async event tracing support Chaitanya Kulkarni
2020-04-22  8:19 ` [PATCH V3 0/7] nvmet: add target ns revalidate support Christoph Hellwig
2020-04-23  6:03   ` Chaitanya Kulkarni
2020-04-23  8:20     ` Sagi Grimberg [this message]
2020-04-24  7:05       ` Christoph Hellwig
2020-04-24  8:34         ` Chaitanya Kulkarni
2020-04-24 19:08         ` Sagi Grimberg
2020-04-24 21:02           ` Sagi Grimberg

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=3f112b29-91cc-620c-6262-de3e322a29fc@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.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 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).