Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp350755pxb; Fri, 29 Oct 2021 11:01:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGogejvF249LCQPMQ84mdyHczqOHChX2VHZaDQ0/odWGeOoKzucXDiHGnebu/5sAW5qbuV X-Received: by 2002:a92:190d:: with SMTP id 13mr8626920ilz.250.1635530502225; Fri, 29 Oct 2021 11:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635530502; cv=none; d=google.com; s=arc-20160816; b=lcWFoEesPjc6h5tmsCBqODxshsGzTmqUwf7Jp2NISpgDadXLz4vkNld5GJiuQdof21 Oevw1/xpsQpBCra/B/Jmt1wG4thzJ1bWqbx1wUVlqdN2lMqI/zi1HHOCA57dRvMpuMP7 gf5UjYKSlQcv8o+o5chZAtVGBD+G20B9OVQd7wuFp+wmsSoHvx1Kc6gs/iRG1508a0a7 b8QryOiJE1XVyuWjrUn9C/1q/2gK94mAF1+PfRjWOJ7CrhXktixwvPY7dGVbFyywTv61 9QYMMUOSU/jAJq52ggxn048YOVJFru5A6h86KqZpt5cRX86Ty9DkACrNHDu5JBZOdpTl fXLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=XDASPpku01pFO+eOc6wIFQVceZpP9DIhHMbdQYP3bIA=; b=t8kQQxdOnBEY8BtnuI4Do2QIlTKX9N9HYLe3eiWikke+YlqOuhz4Lnjstv3hl6/obA k3l0avYooB2UMxIABZ1frKNiqmhLS23G71DPjfZDe2a/B/Xi0ILPaJjX6dKlG7MO8tfg lCP+gFH4fRXBAwwUS0t0fQn5XQgJIhiOl7sjrQo0+xAlayXgQAaMz5XfwlYN8QJezEgH EiL3jWHE88vm+wHN/iQ5UuJ/xwTyK0MdqO2mtZu4c/Jy2XIYHKBnIYkiC6/uj99qwO3U Sq0iwHK7LuiTmVwISuJhNNoq65Beclbd3pvtsl4mB4WWFf7fDe+Xd2Z1qOGclmw+fQyj JVSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si11545061iow.27.2021.10.29.11.01.23; Fri, 29 Oct 2021 11:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229979AbhJ2SB0 (ORCPT + 99 others); Fri, 29 Oct 2021 14:01:26 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:49707 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbhJ2SBY (ORCPT ); Fri, 29 Oct 2021 14:01:24 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R731e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=haoxu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UuB47em_1635530333; Received: from 192.168.31.215(mailfrom:haoxu@linux.alibaba.com fp:SMTPD_---0UuB47em_1635530333) by smtp.aliyun-inc.com(127.0.0.1); Sat, 30 Oct 2021 01:58:54 +0800 Subject: Re: [BUG] About "io_uring: add more uring info to fdinfo for debug" To: Jens Axboe , Eric Dumazet , Eric Dumazet Cc: LKML References: <9ac22d4d-c841-651a-fdd5-9fb3a65c57ab@gmail.com> <3b7dbb90-7fd5-d30f-cfe0-dd83f2cd4482@kernel.dk> <30b7018d-f60d-0c57-b3d6-92c1cf0762b9@kernel.dk> <03e9b953-a9c2-c3bc-c265-b3fff76d7739@linux.alibaba.com> <7c6ec470-0985-2ee8-4cbd-1f9649c7b69c@kernel.dk> From: Hao Xu Message-ID: Date: Sat, 30 Oct 2021 01:58:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <7c6ec470-0985-2ee8-4cbd-1f9649c7b69c@kernel.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/10/30 上午1:56, Jens Axboe 写道: > On 10/29/21 11:54 AM, Hao Xu wrote: >> Hi Jens, >> I was thinking that print all the entries including the unused ones >> would make the list very long(real product use hundreds or thousands >> while there may be just several useful sqes). And that may be confused, >> a example is: sq_array[0-999] = 0, we have only one sqe sqes[0] in use. >> then we'll print sqe[0] 1000 times, though we can get to know the real >> useful one by sq_head and tail info after calculation. >> And if only print the useful ones, exposing the original counters will >> make the loop condition a bit simpler than exposing the ring index(since >> the original counters depend on natural overflow) though we cannot do >> that now since realizing issues like what Eric reports. > > We can revisit in the merge window, I wrote up the pull requests for > this branch (among others) already. The most important part was fixing > the looping to appropriately cap it. > Gotcha