Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4670090imm; Wed, 30 May 2018 09:41:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKbH7eH53JWXbtSrE2IiovwCMM/O9/Ek4p6FyxIusu6Eit2fbchosKO7fdVIRHgr9yKLSGN X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr3429075plb.273.1527698485588; Wed, 30 May 2018 09:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527698485; cv=none; d=google.com; s=arc-20160816; b=mTa1tcKQ5y87aa7qhqbweNHfvE0Ruvt3k/C+12BSvHgqc8yYRVb0tCk2IcpzKW1sh0 4ICTGmaS+2/iiGYEA+9mMVk0/RoeAwIqbb+zAz4i5SCUFpOOfMRJyQlQ/XMywtq/jHuE etYyd65kZM6gTJn3auqYm5U7TwcnInOUpTZhulfJG5vwVIsTSYQ8gQvQmUHzoeiIar5N HtOX1Ek2VVhVC89i/+EAefIdjijrK5UEJP8myr/oMV1OsIE0GX9w8sYpzb0x9OIe7G21 43HMpxdvOFdLzIFz4DrNtqvk9jN41Mm2cGlROwhdZBBSvxgMximjwb1OHA9vLKabyf1J Gylw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=O8XbTttZe8kh7NBfqT20H36WNj97UgIjj9W6SAUT4H4=; b=Mp31Iw3WwbaNBqoux/VBHYlU1G/I6woiWovrwNtUmcGlzLcuZRi1B2agQSSTloG8XR kMzr1UHMiHQh8JE1EkGnoTFNfKep31+GzUW6zbQU6JhOAcyKoLetqAiyqQkwj8NV+uMV UchHhLFo+0ZKHDUKSP0j6gcweygmIcUCCGz8pWJEeGMvwsHiZQbaiq9jk6ChzKKC/kFQ z1iViwxRM5qmAbZkYLV+t6yT6GZ//bYrEBTm4YgX95bGEGZYJb5vlyjiv1xbZ8tCSc4c RUs8BNJ5EL4kJffoj32lJ8g4y1iWb/9/1cKiMIqpxbeM11a6H8EkyyYDipMZTMoy8nUT uFGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=InVBGwxb; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3-v6si34359314pld.116.2018.05.30.09.41.10; Wed, 30 May 2018 09:41:25 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=InVBGwxb; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbeE3Qkp (ORCPT + 99 others); Wed, 30 May 2018 12:40:45 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:37834 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684AbeE3Qkn (ORCPT ); Wed, 30 May 2018 12:40:43 -0400 Received: by mail-yb0-f195.google.com with SMTP id i13-v6so6579705ybl.4; Wed, 30 May 2018 09:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=O8XbTttZe8kh7NBfqT20H36WNj97UgIjj9W6SAUT4H4=; b=InVBGwxbXUXxYg3halmDDk57hUMDoz7HSBN9CAREoIp1p7vpSzmpNbjgl+ZRkj8M+P ARL7RKENnTYp6XdwajNnZtGqJcNJ0rwhWvnnnBrNtzr6R8UvlARM/q7BmtIgAcA3AZfz LTbH+wHMFeNi5ghawbvU6dT7KQNOLPlh+aCX2H3TYDnNLVGCHbEPCHn1+axw5IE4+GvW ZdUcAQM5c4gFIU6Lkaqy2HpBfHpAWdPgo9Wh1txhk+QEYmxwAFnLATgngWyao2d+4PbS e+bHpXbEJ+enwOq4LSX4nfd2HVxNpmsHiUEjEvmI7nVMb814Ns55rRYhzLIX1074y7ik PTDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=O8XbTttZe8kh7NBfqT20H36WNj97UgIjj9W6SAUT4H4=; b=Tc8PSjXrp5lAf60QKgHCAs3A6T3ZHNF6wYz2aBQgRX91OoTvd7RdkrznBkDsBoswDZ fzRLHKS2G2Q7G9uNft7ywLIVLb6NgVMcwDXbmFxwYLtEe7xK4bVdDLCu0FkCpH6OhVog dVujlfX2gM6bkeJaNSvbt+Juql/pcxdfps34UEpSedr0QkUtWPzLcp+kwISH29i5OFoO /6YjAi0evKBuFiQgBxw/jGR7llQrvdiah1LO3DMIMAeD0wORB8YkTVCSo1/8tnCXraJf fq7ePVv4VWvdlW3wjAFdE0lpzVBHMum2Ax3XAA1VX/yrXOOvQhcvTWFdFEMh47Q6BeOQ YNxw== X-Gm-Message-State: ALKqPweAHwi+6C4n8+XIGaQ+ei1V1fLPcvYbIeaaKxEy3RJfuVf8sRmG PHd2+aEMRQJIJSbttAg6gr4= X-Received: by 2002:a25:71d6:: with SMTP id m205-v6mr1876447ybc.399.1527698442422; Wed, 30 May 2018 09:40:42 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::1:6002]) by smtp.gmail.com with ESMTPSA id t142-v6sm16622262ywc.33.2018.05.30.09.40.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 09:40:41 -0700 (PDT) Date: Wed, 30 May 2018 09:40:39 -0700 From: Tejun Heo To: Josef Bacik Cc: axboe@kernel.dk, kernel-team@fb.com, linux-block@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Josef Bacik Subject: Re: [PATCH 12/13] block: introduce blk-iolatency io controller Message-ID: <20180530164039.GP1351649@devbig577.frc2.facebook.com> References: <20180529211724.4531-1-josef@toxicpanda.com> <20180529211724.4531-13-josef@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529211724.4531-13-josef@toxicpanda.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Just interface nits. On Tue, May 29, 2018 at 05:17:23PM -0400, Josef Bacik wrote: ... > +static size_t iolatency_pd_stat(struct blkg_policy_data *pd, char *buf, > + size_t size) > +{ > + struct iolatency_grp *iolat = pd_to_lat(pd); > + struct blkcg_gq *blkg = pd_to_blkg(pd); > + unsigned use_delay = atomic_read(&blkg->use_delay); > + > + if (!iolat->min_lat_nsec) > + return 0; > + > + return snprintf(buf, size, > + " depth=%u delay=%llu use_delay=%u total_lat_avg=%llu", > + iolat->rq_depth.max_depth, Can we please use "max" as depth value when there is no restriction? > + (unsigned long long)(use_delay ? > + atomic64_read(&blkg->delay_nsec) / > + NSEC_PER_USEC : 0), > + use_delay, > + (unsigned long long)iolat->total_lat_avg / > + NSEC_PER_USEC); and "avg_lat". I'm a bit worried about exposing anything other than avg_lat given that they're inherently implementation details. I think it might be a good idea to gate them behind a kernel boot param (which hopefully can be turned on/off while the system is running). Thanks. -- tejun