From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932668AbcEKNlY (ORCPT ); Wed, 11 May 2016 09:41:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56305 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932303AbcEKNlX (ORCPT ); Wed, 11 May 2016 09:41:23 -0400 From: Jeff Moyer To: Shaohua Li Cc: , , Steven Rostedt , , Subject: Re: [PATCH 3/3] blk-throttle: don't parse cgroup path if trace isn't enabled References: <2c3ee532132f8925dd0be1178e8dee0bba6b448c.1462838969.git.shli@fb.com> <20160511002004.GA2293701@devbig084.prn1.facebook.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Wed, 11 May 2016 09:41:20 -0400 In-Reply-To: <20160511002004.GA2293701@devbig084.prn1.facebook.com> (Shaohua Li's message of "Tue, 10 May 2016 17:20:04 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 11 May 2016 13:41:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shaohua Li writes: > On Tue, May 10, 2016 at 11:52:15AM -0400, Jeff Moyer wrote: >> Shaohua Li writes: >> >> > if trace isn't enabled, parsing cgroup path just wastes cpu >> > >> > Signed-off-by: Shaohua Li >> > --- >> > block/blk-throttle.c | 5 ++--- >> > include/linux/blktrace_api.h | 9 +++++++++ >> > 2 files changed, 11 insertions(+), 3 deletions(-) >> > >> > diff --git a/block/blk-throttle.c b/block/blk-throttle.c >> > index 2149a1d..47a3e54 100644 >> > --- a/block/blk-throttle.c >> > +++ b/block/blk-throttle.c >> > @@ -211,15 +211,14 @@ static struct throtl_data *sq_to_td(struct throtl_service_queue *sq) >> > * >> > * The messages are prefixed with "throtl BLKG_NAME" if @sq belongs to a >> > * throtl_grp; otherwise, just "throtl". >> > - * >> > - * TODO: this should be made a function and name formatting should happen >> > - * after testing whether blktrace is enabled. >> >> You've only addressed the second part of the TODO, please don't remove >> the first part. > > alright, I'll send a patch to convert it to a function. Heh. I figured you'd just put that part of the TODO back in there. But actually addressing it sounds better. ;-) Thanks! Jeff