From: "Cao, Quanquan/曹 全全" <caoqq@fujitsu.com>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>,
"Jiang, Dave" <dave.jiang@intel.com>
Cc: "linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: [ISSUE] `cxl disable-region region0` twice but got same output
Date: Thu, 9 Nov 2023 16:35:33 +0800 [thread overview]
Message-ID: <6dc5d1c3-3984-aa82-5e7a-436da62fba40@fujitsu.com> (raw)
In-Reply-To: <9b0f2cc0330197456bd5c810561b390a7606a26b.camel@intel.com>
在 2023/11/1 1:22, Verma, Vishal L 写道:
> On Mon, 2023-10-30 at 14:41 +0800, Cao, Quanquan/曹 全全 wrote:
>>
> [..]
>> After investigation, it was found that when disabling the region and
>> attempting to disable the same region again, the message "cxl region:
>> cmd_disable_region: disabled 1 region" is still returned.
>> I consider this to be unreasonable.
>>
>>
>> Test Example:
>>
>> [root@fedora-37-client memory]# cxl list
>> [
>> {
>> "memdevs":[
>> {
>> "memdev":"mem0",
>> "ram_size":1073741824,
>> "serial":0,
>> "host":"0000:0d:00.0"
>> }
>> ]
>> },
>> {
>> "regions":[
>> {
>> "region":"region0",
>> "resource":27111981056,
>> "size":1073741824,
>> "type":"ram",
>> "interleave_ways":1,
>> "interleave_granularity":256,
>> "decode_state":"commit"
>> }
>> ]
>> }
>> ]
>>
>> [root@fedora-37-client ~]# cxl disable-region region0
>> cxl region: cmd_disable_region: disabled 1 region
>> [root@fedora-37-client ~]# cxl disable-region region0
>> cxl region: cmd_disable_region: disabled 1 region
>>
>> expectation:cmd_disable_region: disabled 0 region
>
> This is by design, I think it would be more confusing if the user asks
> to disable-region, the response is "disabled 0 regions", and then finds
> that the region is actually in the disabled state.
>
> There is also precedent for this, as all disable-<foo> commands in
> ndctl and cxl-cli behave the same way.
>
> Perhaps a clarification in the man page makes sense noting this
> behavior?
>
About this,i would like to ask if the design adopts the "idempotency"
pattern
prev parent reply other threads:[~2023-11-09 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 6:41 [ISSUE] `cxl disable-region region0` twice but got same output Cao, Quanquan/曹 全全
2023-10-31 16:24 ` Dave Jiang
2023-10-31 17:22 ` Verma, Vishal L
2023-11-02 3:06 ` Cao, Quanquan/曹 全全
2023-11-09 8:35 ` Cao, Quanquan/曹 全全 [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=6dc5d1c3-3984-aa82-5e7a-436da62fba40@fujitsu.com \
--to=caoqq@fujitsu.com \
--cc=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).