Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp882792imm; Thu, 13 Sep 2018 09:09:06 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8z5d5LzkbQz9bNUmRILN6x4lyScsCOlFJpIDkmDVAwGfXVLNKGKAF/fMG6JF7LB4N+6oP X-Received: by 2002:a65:6654:: with SMTP id z20-v6mr7818957pgv.186.1536854946153; Thu, 13 Sep 2018 09:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536854946; cv=none; d=google.com; s=arc-20160816; b=CEirE7vfQLWMqnJ8qDLplo3YTPM/AVc7cHhPi+qpoIosaDKMqe65dJwbQRtX3z3rPs in8s+VPb/2YldZS84ZInAFE/qXtjc5Fhv5Q+pZ6eFNnT2IbdPgiLL/L40EyinzFcmjY0 bBK624iAQLpFmoTxxbOy0uhEkz5fJXkUSuw2BItXxaY0GwRfL26AAWGQhyejCBpLKLpI j1luyjOthCr58mcd1O2UUYF1KMTdaM1cS9THKc9x4IdLP2lpLTPQKUgldNbchcNEADmK Cl8JyILy32UMMMmWyW6yPx+2mpbVMyziqLCNwZE0UdFrkrWyscR+a98EFuPbMiSdEMw5 xqWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=pOm2mr6aSAqxDX01awfi7e3JLQwJtZfrnhZezjuEvoc=; b=nFqRNsnHv42vEQ5K9Aves30FQSejrSHlzOPfkkPI/xUAhL60sBT6SATCX1vqXm3UHa U2VDidRAYHuTZ5sz5FnbfmbQnMD2r+7yvuFblQIPxZKZ+MkxhXUqS7lLKLVsiE8YSRl7 KaqkwyAoeklFi4/4rfvBsLeGq+BSSEEeQrq5IrF8HJTvtjj1LXQhUA17teyLFuU6bXXe pqxFA7xHLDyMoUMY0m0pQowPnr/cgMaIDC3grfmy+Hkl3dEudzwYLBrNKGoQGcjwnoX7 ulSXZN7dT1/IqsGCPH1JrcfNoXM0cwgrJGy40A3OYpb8weHRUrJmo5T33tL5TmiXXGy6 HIGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h22-v6si4707713pfa.238.2018.09.13.09.08.50; Thu, 13 Sep 2018 09:09:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbeIMVRW (ORCPT + 99 others); Thu, 13 Sep 2018 17:17:22 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:50490 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbeIMVRW (ORCPT ); Thu, 13 Sep 2018 17:17:22 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id ED59C13FDD215; Thu, 13 Sep 2018 09:07:12 -0700 (PDT) Date: Thu, 13 Sep 2018 09:07:12 -0700 (PDT) Message-Id: <20180913.090712.1849966692069488441.davem@davemloft.net> To: gomonovych@gmail.com Cc: w-kwok2@ti.com, m-karicheri2@ti.com, grygorii.strashko@ti.com, vasyl.gomonovych@nokia.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] knav: qmss: Introduce queue descriptors monitor From: David Miller In-Reply-To: <20180911211549.12092-1-gomonovych@gmail.com> References: <20180911211549.12092-1-gomonovych@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 13 Sep 2018 09:07:13 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasyl Gomonovych Date: Tue, 11 Sep 2018 23:15:47 +0200 > Monitor and record available descriptors in knav_qmss queues > Get amount of available descriptors in free-descriptor queue > base on event-triggered RX traffic. > Also monitor free-descriptor queue base on periodic time interval > in kernel thread. > To start monitoring available descriptors in queue earlyi, > module parameters, enable start monitoring in boottime > > This queue descriptor monitor helps debugging starvation issue. > The monitor should help debug queue under traffic pressure > and can describe the shape of this pressure when a queue > faced descriptors starvation. > Monitor helpful for IP blocks which do not have dedicated > descriptor starvation interrupt like RapidIO IP. > > Registration and enable file in debugfs hierarchy > > |-/sys/kernel/debug > |-- knav_qmssm_soc:hwqueue@2a40000 > | |-- 8710 > | | |-- buffer_size > | | |-- enable > | | |-- monitor_stats > | | -- unregister > > --- > > The current implementation is the first iteration > and require additional work. > By this patch I would like to know does this could be > helpful for other components and continue my work in a right way. > > Signed-off-by: Vasyl Gomonovych This is way over engineered for just keeping some statistics around. Just have a periodic timer or a workqueue that does the necessary sampling.