From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbcKBFhj (ORCPT ); Wed, 2 Nov 2016 01:37:39 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:35026 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbcKBFhh (ORCPT ); Wed, 2 Nov 2016 01:37:37 -0400 From: Jens Axboe X-Google-Original-From: Jens Axboe Date: Tue, 1 Nov 2016 23:37:34 -0600 To: Johannes Thumshirn Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, hch@lst.de Subject: Re: [PATCH 1/4] block: add scalable completion tracking of requests Message-ID: <20161102053734.GA1317@kernel.dk> References: <1478034325-28232-1-git-send-email-axboe@fb.com> <1478034325-28232-2-git-send-email-axboe@fb.com> <20161101222550.u64m4txqjgoohwbv@linux-x5ow.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161101222550.u64m4txqjgoohwbv@linux-x5ow.site> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 01 2016, Johannes Thumshirn wrote: > On Tue, Nov 01, 2016 at 03:05:22PM -0600, Jens Axboe wrote: > > For legacy block, we simply track them in the request queue. For > > blk-mq, we track them on a per-sw queue basis, which we can then > > sum up through the hardware queues and finally to a per device > > state. > > > > The stats are tracked in, roughly, 0.1s interval windows. > > > > Add sysfs files to display the stats. > > > > Signed-off-by: Jens Axboe > > --- > > [...] > > > > > /* incremented at completion time */ > > unsigned long ____cacheline_aligned_in_smp rq_completed[2]; > > + struct blk_rq_stat stat[2]; > > Can you add an enum or define for the directions? Just 0 and 1 aren't very > intuitive. Good point, I added that and updated both the stats patch and the subsequent blk-mq poll code. -- Jens Axboe