From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95A5AC433E0 for ; Tue, 29 Dec 2020 13:32:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51C8A2079A for ; Tue, 29 Dec 2020 13:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726292AbgL2Nc0 convert rfc822-to-8bit (ORCPT ); Tue, 29 Dec 2020 08:32:26 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]:2348 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbgL2NcZ (ORCPT ); Tue, 29 Dec 2020 08:32:25 -0500 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4D4wJq3hGWz13bV5; Tue, 29 Dec 2020 21:30:19 +0800 (CST) Received: from dggema701-chm.china.huawei.com (10.3.20.65) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 29 Dec 2020 21:31:39 +0800 Received: from dggema703-chm.china.huawei.com (10.3.20.67) by dggema701-chm.china.huawei.com (10.3.20.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Tue, 29 Dec 2020 21:31:39 +0800 Received: from dggema703-chm.china.huawei.com ([10.8.64.130]) by dggema703-chm.china.huawei.com ([10.8.64.130]) with mapi id 15.01.1913.007; Tue, 29 Dec 2020 21:31:39 +0800 From: liweihang To: "linux-rdma@vger.kernel.org" , "jgg@ziepe.ca" , "leon@kernel.org" CC: "linuxarm@openeuler.org" Subject: Is it ok to use debugfs to dump some ucontext-level driver-defined info? Thread-Topic: Is it ok to use debugfs to dump some ucontext-level driver-defined info? Thread-Index: AQHW3ebw3F8B3O2FE0G2KEXK5NMuLQ== Date: Tue, 29 Dec 2020 13:31:39 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.100.165] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Hi all, We want to dump some hns driver-defined information that belongs to a process to keep track of current memory usage. For example, there is a ucontext-level(process-level) memory pool to store WQE which is shared by a lot of QPs, we want to record and query which QPs are using this pool and how much space each QP is using. rdmatool don't have a ucontext-level resource tracking currently, is it ok to achieve that through debugfs? This may looks like: $ echo 1 > /hns_roce/hns_0//qp QPN Total(kB) SQ(kB) SGE(kB) RQ(kB) 110 6400 256 2048 4096 118 6400 256 2048 0 Or should it be achieved in rdmatool? Thanks Weihang