From: Wen Gu <guwen@linux.alibaba.com>
To: Wenjia Zhang <wenjia@linux.ibm.com>,
"D. Wythe" <alibuda@linux.alibaba.com>,
Zhengchao Shao <shaozhengchao@huawei.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: jaka@linux.ibm.com, tonylu@linux.alibaba.com,
weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net-next] net/smc: add the max value of fallback reason count
Date: Fri, 2 Aug 2024 22:05:57 +0800 [thread overview]
Message-ID: <439a499a-13ae-47e7-af54-3d9f064766af@linux.alibaba.com> (raw)
In-Reply-To: <4213b756-a92f-4be9-951d-893f4a6590b4@linux.ibm.com>
On 2024/8/2 19:17, Wenjia Zhang wrote:
>
>
> On 02.08.24 04:38, D. Wythe wrote:
>>
>>
>> On 8/1/24 7:35 PM, Zhengchao Shao wrote:
>>> The number of fallback reasons defined in the smc_clc.h file has reached
>>> 36. For historical reasons, some are no longer quoted, and there's 33
>>> actually in use. So, add the max value of fallback reason count to 50.
>>>
>>> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
>>> ---
>>> net/smc/smc_stats.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/smc/smc_stats.h b/net/smc/smc_stats.h
>>> index 9d32058db2b5..ab5aafc6f44c 100644
>>> --- a/net/smc/smc_stats.h
>>> +++ b/net/smc/smc_stats.h
>>> @@ -19,7 +19,7 @@
>>> #include "smc_clc.h"
>>> -#define SMC_MAX_FBACK_RSN_CNT 30
>>> +#define SMC_MAX_FBACK_RSN_CNT 50
>> It feels more like a fix ?
>>
>>> enum {
>>> SMC_BUF_8K,
>>
>
> Hi Zhengchao,
>
> IMO It should be 36 instead of 50 because of unnecessary smc_stats_fback element and unnecessary scanning e.g. in smc_stat_inc_fback_rsn_cnt(). If there is any new reason code coming later, the one who are introducing the new reason code should update the the value correspondingly.
I wonder if it is really necessary to expand to 50, since generally
the reasons for fallback in a machine will be concentrated into a few,
normally less than 10, so there is almost no case of using up all 30
reason slots.
Thanks!
> Btw, I also it is a bug fix other than feature.
>
> Thanks,
> Wenjia
next prev parent reply other threads:[~2024-08-02 14:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 11:35 [PATCH net-next] net/smc: add the max value of fallback reason count Zhengchao Shao
2024-08-02 2:38 ` D. Wythe
2024-08-02 11:17 ` Wenjia Zhang
2024-08-02 14:05 ` Wen Gu [this message]
2024-08-05 0:55 ` shaozhengchao
2024-08-05 0:56 ` shaozhengchao
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=439a499a-13ae-47e7-af54-3d9f064766af@linux.alibaba.com \
--to=guwen@linux.alibaba.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shaozhengchao@huawei.com \
--cc=tonylu@linux.alibaba.com \
--cc=weiyongjun1@huawei.com \
--cc=wenjia@linux.ibm.com \
--cc=yuehaibing@huawei.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