* [ISSUE] `cxl disable-region region0` twice but got same output
@ 2023-10-30 6:41 Cao, Quanquan/曹 全全
2023-10-31 16:24 ` Dave Jiang
2023-10-31 17:22 ` Verma, Vishal L
0 siblings, 2 replies; 5+ messages in thread
From: Cao, Quanquan/曹 全全 @ 2023-10-30 6:41 UTC (permalink / raw)
To: Dave Jiang, vishal.l.verma; +Cc: linux-cxl, nvdimm
Dear Linux Community Members,
I am writing to seek assistance with a issue that I have encountered
while testing [Repeat executing the "cxl disable-region region0"
command]. I have provided a detailed description of the problem along
with relevant test for reference. I would greatly appreciate it if you
could spare some time to help me resolve this issue.
Problem Description:
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
Thank you very much for taking the time to review my issue. I am
grateful for your assistance and look forward to your response.
Best regards,
Quanquan Cao
caoqq@fujitsu.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ISSUE] `cxl disable-region region0` twice but got same output
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
1 sibling, 0 replies; 5+ messages in thread
From: Dave Jiang @ 2023-10-31 16:24 UTC (permalink / raw)
To: Cao, Quanquan/曹 全全, vishal.l.verma; +Cc: linux-cxl, nvdimm
On 10/29/23 23:41, Cao, Quanquan/曹 全全 wrote:
> Dear Linux Community Members,
>
> I am writing to seek assistance with a issue that I have encountered while testing [Repeat executing the "cxl disable-region region0" command]. I have provided a detailed description of the problem along with relevant test for reference. I would greatly appreciate it if you could spare some time to help me resolve this issue.
Hi Quanquan,
I've reproduced the issue. I'll take a look.
>
> Problem Description:
>
> 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
>
>
> Thank you very much for taking the time to review my issue. I am grateful for your assistance and look forward to your response.
>
> Best regards,
> Quanquan Cao
> caoqq@fujitsu.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ISSUE] `cxl disable-region region0` twice but got same output
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/曹 全全
1 sibling, 2 replies; 5+ messages in thread
From: Verma, Vishal L @ 2023-10-31 17:22 UTC (permalink / raw)
To: Jiang, Dave, caoqq@fujitsu.com
Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ISSUE] `cxl disable-region region0` twice but got same output
2023-10-31 17:22 ` Verma, Vishal L
@ 2023-11-02 3:06 ` Cao, Quanquan/曹 全全
2023-11-09 8:35 ` Cao, Quanquan/曹 全全
1 sibling, 0 replies; 5+ messages in thread
From: Cao, Quanquan/曹 全全 @ 2023-11-02 3:06 UTC (permalink / raw)
To: Verma, Vishal L, Jiang, Dave
Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
在 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.
How about adding a hint like ‘region0 already disabled’ before 'disabled
0 regions'? I think this could be more friendly for user.
>
> 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?
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ISSUE] `cxl disable-region region0` twice but got same output
2023-10-31 17:22 ` Verma, Vishal L
2023-11-02 3:06 ` Cao, Quanquan/曹 全全
@ 2023-11-09 8:35 ` Cao, Quanquan/曹 全全
1 sibling, 0 replies; 5+ messages in thread
From: Cao, Quanquan/曹 全全 @ 2023-11-09 8:35 UTC (permalink / raw)
To: Verma, Vishal L, Jiang, Dave
Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
在 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-09 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox