Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp723529pxb; Wed, 8 Sep 2021 10:46:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzusN6DctPmiornrVt/z3PYFR4YPY5E7SA49ukuqkXNDRTpotuVvn4B/nEwC9eJqh6o3jEX X-Received: by 2002:a5d:8b04:: with SMTP id k4mr930676ion.58.1631123182458; Wed, 08 Sep 2021 10:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631123182; cv=none; d=google.com; s=arc-20160816; b=PgZtBYxAGfSzaNjb57o7OAiPwKNQKlJLc7pfEKzQjG5YY+CntA6yYe6rHEoUOELZeq Mb39Oj4xKys8I/Lo4cj1NaidQI9lmPWjZ0/biLAJKdDsQJpPuvcpJT7Vy38DbDpC+Cf3 D1v94O268mU4drm1APnEREoi/3S3BQdOafNfG4rh/xY4TeW6cGAjtjh9c4YYsPE8xoTG BvoBQLv0CQwF8m7AjwhMZ72tRfaQA5IF4IDHAjuUwz+ChD7wEkX7QtzVmaEar6DluQpH p//EPJmqzCm/59M85mUHZiFcStS0EKGJCgBm/XaKpikJkVH2/m8Id9ucfxHF5VqMQqBg bjlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=XAjaXzjOTvm6tnk3OCd3e8PuYu58uPhQMF4eJmLzdVo=; b=atJFfr/B48GSrTeFB6cGm5lVf0z0S3qYEmFipxMswCdDNgGIN+xRisrU0ZSuEnuPv5 Lf0+7HE8N4CqrWmMwZ5yJl0Ygfp61JGp/JhH+PYcPW9FPTTfqwj0XjG9t9BgofS83chC sxYBZVTbt3qiBmRcCvWM8hR1jW+Fjw4kuSvAptlGdOdNkcNd3KzENsVTF5qWowPW3aLc HJJFElxAESrC1R7Sbj/E2N20aouYD3Kt+a/WgpUjQEV/JzJxuZwQ7NcQrJO+HYfe85j3 HNzShqO6IktaSq0I16VFcktDQRkjubls7VXIGdVEn1HD5JWzsjFYGAL74BxwAdWMZDH9 awFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FYD6C6nf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o20si3031245iov.71.2021.09.08.10.46.09; Wed, 08 Sep 2021 10:46:22 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FYD6C6nf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349445AbhIHPJy (ORCPT + 99 others); Wed, 8 Sep 2021 11:09:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:39488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349248AbhIHPJx (ORCPT ); Wed, 8 Sep 2021 11:09:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 548E6611C6; Wed, 8 Sep 2021 15:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631113725; bh=EcFdlIlPuXpuvXGjbL2rGt+KIE0grzuBurK1IY0GYXE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FYD6C6nflF/20yxECHrnoZBf29DPDeGsA08BuRUaUu4zoq4SOfCTCCObhS79xN04O 2lfsy/eWmi8YES3m73WjP50fWo+g5qb6V9xSMuuv/0BBpt/0uD25K4v/3m8FBZFq90 Yj7GtcWbEP280yCS1oBb9nGKyPL6s26OtKm0V0flqnG8x4oW2DA/8OTmsyocIi6xkx 3shuPnOlles6AsM3pZdgn0gpdv8mZhbrRKFsLtclrBzJTQSd0FgNRgGHxdl9jT0RFl lZkB6myOLN0wFmMx45AzmDE9OHkm1kJMz6eyv02SQCQJj9cdLZElUSFxT345pI/97o oZoseWoFvIdgw== Date: Wed, 8 Sep 2021 08:08:43 -0700 From: Jakub Kicinski To: moyufeng Cc: Yunsheng Lin , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v2 4/4] net: hns3: support skb's frag page recycling based on page pool Message-ID: <20210908080843.2051c58d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <2b75d66b-a3bf-2490-2f46-fef5731ed7ad@huawei.com> References: <1628217982-53533-1-git-send-email-linyunsheng@huawei.com> <1628217982-53533-5-git-send-email-linyunsheng@huawei.com> <2b75d66b-a3bf-2490-2f46-fef5731ed7ad@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Sep 2021 16:31:40 +0800 moyufeng wrote: > After adding page pool to hns3 receiving package process, > we want to add some debug info. Such as below: >=20 > 1. count of page pool allocate and free page, which is defined > for pages_state_hold_cnt and pages_state_release_cnt in page > pool framework. >=20 > 2. pool size=E3=80=81order=E3=80=81nid=E3=80=81dev=E3=80=81max_len, which= is setted for > each rx ring in hns3 driver. >=20 > In this regard, we consider two ways to show these info=EF=BC=9A >=20 > 1. Add it to queue statistics and query it by ethtool -S. >=20 > 2. Add a file node "page_pool_info" for debugfs, then cat this > file node, print as below: >=20 > queue_id allocate_cnt free_cnt pool_size order nid dev max_len > 000 xxx xxx xxx xxx xxx xxx xxx > 001 > 002 > . > . > =09 > Which one is more acceptable, or would you have some other suggestion? Normally I'd say put the stats in ethtool -S and the rest in debugfs but I'm not sure if exposing pages_state_hold_cnt and pages_state_release_cnt directly. Those are short counters, and will very likely wrap. They are primarily meaningful for calculating page_pool_inflight(). Given this I think their semantics may be too confusing for an average ethtool -S user. Putting all the information in debugfs seems like a better idea.