All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"hch@lst.de" <hch@lst.de>
Cc: "ailiop@suse.com" <ailiop@suse.com>
Subject: Re: [PATCH V2 2/2] nvmet: add per ns thread to generate AEN
Date: Thu, 9 Apr 2020 21:07:45 -0700	[thread overview]
Message-ID: <fb1ec36e-93dc-c948-aed5-dcbe45e75b3b@grimberg.me> (raw)
In-Reply-To: <SN6PR04MB4973EEEE55016BAB488C180A86C00@SN6PR04MB4973.namprd04.prod.outlook.com>


>> But maybe it won't be such a strange thing to dedicate a maintenance
>> thread that would do stuff like this. My main issue with his is that it
>> is polling which to me seems like a band-aid really...
> 
> It is, but having a lightweight maintenance thread is very simple way
> to implement this for bdev and file

Simple at first sight, my main concern is what the impact may be...

> without involving userspace or fancy hacks.

Wouldn't call these hacks really, we have several examples of
disk resize triggering events to usespace.

> What are your concerns about polling (as in sleep() and schedule()
> calls wrt to the code)? Can you please elaborate ?

What is the right polling scheme? what is the impact on the system 
performance? What happens when you have a lot of namespaces?
I view the polling scheme a band-aid resulting for lack of event driven
infrastructure for disk resize.

>>>> I'd suggest to expose a revalidate configfs attribute and have nvmetcli
>>>> install a udev rule that triggers a write to this attribute. Balbir
>>>> already got the udev notification for disk resize (see
>>>> set_capacity_revalidate_and_notify).
>>>
>>> Okay we can do that. So you are saying generate the AEN from configs
>>> attribute.
>>
>> Yes.. that won't work for file backed namespaces though...
>>
> 
> Isn't that defeats the purpose of having a file backend which provides
> more flexibility to the user ?

We could have something that leverages fsnotify to address files...

> I think we should at least try an implementation which has global
> maintenance thread, measure the impact and then discard it before going
> to userspace.

I'm not too fond of the idea in general, but I could be convinced
otherwise. I'm interested to learn what others think.

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

  reply	other threads:[~2020-04-10  4:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  4:16 [PATCH V2 0/2] nvmet: add revalidate support Chaitanya Kulkarni
2020-04-08  4:16 ` [PATCH V2 1/2] nvmet: add ns revalidation support Chaitanya Kulkarni
2020-04-08  4:16 ` [PATCH V2 2/2] nvmet: add per ns thread to generate AEN Chaitanya Kulkarni
2020-04-08  5:33   ` Sagi Grimberg
2020-04-08  5:43     ` Chaitanya Kulkarni
2020-04-08  5:48       ` Chaitanya Kulkarni
2020-04-08  5:55       ` Sagi Grimberg
2020-04-08 15:12         ` Chaitanya Kulkarni
2020-04-10  4:07           ` Sagi Grimberg [this message]
2020-04-20  0:13             ` Chaitanya Kulkarni
2020-04-08  9:55     ` Anthony Iliopoulos
2020-04-08 15:25       ` Chaitanya Kulkarni
2020-04-08 17:08         ` Anthony Iliopoulos
2020-04-08 23:28           ` Chaitanya Kulkarni
2020-04-09  9:41             ` Anthony Iliopoulos
2020-04-20  0:20               ` Chaitanya Kulkarni
2020-04-08  5:24 ` [PATCH V2 0/2] nvmet: add revalidate support Chaitanya Kulkarni

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=fb1ec36e-93dc-c948-aed5-dcbe45e75b3b@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=ailiop@suse.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 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.