[PATCH v4 3/3] ring: add telemetry cmd for ring info

Jie Hai haijie1 at huawei.com
Tue Jun 20 10:14:27 CEST 2023


On 2023/2/20 20:55, David Marchand wrote:
> On Fri, Feb 10, 2023 at 3:50 AM Jie Hai <haijie1 at huawei.com> wrote:
>>
>> This patch supports dump of ring information by its name.
>> An example using this command is shown below:
>>
>> --> /ring/info,MP_mb_pool_0
>> {
>>    "/ring/info": {
>>      "name": "MP_mb_pool_0",
>>      "socket": 0,
>>      "flags": "0x0",
>>      "producer_type": "MP",
>>      "consumer_type": "MC",
>>      "size": 262144,
>>      "mask": "0x3ffff",
>>      "capacity": 262143,
>>      "used_count": 153197,
>>      "consumer_tail": 2259,
>>      "consumer_head": 2259,
>>      "producer_tail": 155456,
>>      "producer_head": 155456,
> 
> What would an external user make of such an information?
> 
> I'd like to have a better idea what your usecase is.
> If it is for debugging, well, gdb is probably a better candidate.
> 
> 
Hi David,
Thanks for your question and I'm sorry for getting back to you so late.
There was a problem with my mailbox and I lost all my mails.

The ring information exported by telemetry can be used to check the ring
status periodically during normal use. When an error occurs, the fault 
cause can be deduced based on the information.
GDB is more suitable for locating errors only when they are sure that
errors will occur.

>>      "mz_name": "RG_MP_mb_pool_0",
>>      "mz_len": 2097536,
>>      "mz_hugepage_sz": 1073741824,
>>      "mz_socket_id": 0,
>>      "mz_flags": "0x0"
>>    }
>> }
> 
> 


More information about the dev mailing list