From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] knav: qmss: Introduce queue descriptors monitor Date: Thu, 13 Sep 2018 09:07:12 -0700 (PDT) Message-ID: <20180913.090712.1849966692069488441.davem@davemloft.net> References: <20180911211549.12092-1-gomonovych@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 To: gomonovych@gmail.com Return-path: In-Reply-To: <20180911211549.12092-1-gomonovych@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.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.