From: Jens Axboe <axboe@kernel.dk>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
Guixin Liu <kanie@linux.alibaba.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH] nvmet: support reservation feature
Date: Wed, 10 Jan 2024 10:16:00 -0700 [thread overview]
Message-ID: <28ab4dea-782f-4cd8-adbc-9bcdf6aad2ab@kernel.dk> (raw)
In-Reply-To: <0652d478-9b46-400b-85ec-b3a2bb54ff67@nvidia.com>
On 1/10/24 1:31 AM, Chaitanya Kulkarni wrote:
>>>> @@ -904,6 +906,16 @@ static u16 nvmet_parse_io_cmd(struct nvmet_req
>>>> *req)
>>>> return ret;
>>>> }
>>>> + ret = nvmet_pr_check_cmd_access(req);
>>>> + if (unlikely(ret)) {
>>>> + req->error_loc = offsetof(struct nvme_common_command, opcode);
>>>> + return ret;
>>>> + }
>>>> +
>>>> + ret = nvmet_parse_pr_cmd(req);
>>>> + if (!ret)
>>>> + return ret;
>>>> +
>>> Can we make this feature configurable via Kconfig? If someone doesn't
>>> want to
>>> use PR, they will have to bear the cost of these checks in the fast
>>> path.
>>
>> Yeah, I have added a resv_enable in configfs, the default is false,
>> one can
>>
>> make reservation enable before enable namespace.
>
> Why can't we make it KConfig option ? Is there any particular reason
> for not doing that ? That will also allow user to avoid kernel
> compilation of code if they want to turn it off.
Kernel config options generally don't fix anything, as distros enable
everything anyway. It's mostly used as a cop-out if adding something and
people complain that it's slowing things down, and then the answer is
"well you can just not enable it". Not useful when distros blindly
enable everything anyway, it solves absolutely nothing.
Either it's cheap enough that it should just be generally available, or
it should be written in such a way that it is cheap enough.
--
Jens Axboe
next prev parent reply other threads:[~2024-01-10 17:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 12:10 [PATCH] nvmet: support reservation feature Guixin Liu
2024-01-09 17:01 ` Keith Busch
2024-01-10 3:19 ` Guixin Liu
2024-01-10 4:36 ` Chaitanya Kulkarni
2024-01-10 5:59 ` Guixin Liu
2024-01-10 17:57 ` Keith Busch
2024-01-10 4:34 ` Chaitanya Kulkarni
2024-01-10 5:58 ` Guixin Liu
2024-01-10 8:31 ` Chaitanya Kulkarni
2024-01-10 8:45 ` Guixin Liu
2024-01-10 17:16 ` Jens Axboe [this message]
2024-01-10 15:47 ` Sagi Grimberg
[not found] ` <d9cf6a40-e0bc-4b2c-b421-b313e1f57f10@linux.alibaba.com>
2024-01-11 12:09 ` Guixin Liu
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=28ab4dea-782f-4cd8-adbc-9bcdf6aad2ab@kernel.dk \
--to=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--cc=kanie@linux.alibaba.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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