From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbcG2NAN (ORCPT ); Fri, 29 Jul 2016 09:00:13 -0400 Received: from outbound-smtp07.blacknight.com ([46.22.139.12]:47553 "EHLO outbound-smtp07.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365AbcG2NAK (ORCPT ); Fri, 29 Jul 2016 09:00:10 -0400 Date: Fri, 29 Jul 2016 14:00:06 +0100 From: Mel Gorman To: Dave Chinner Cc: Tony Jones , Michal Hocko , Janani Ravichandran , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, hannes@cmpxchg.org, vdavydov@virtuozzo.com, vbabka@suse.cz, kirill.shutemov@linux.intel.com, bywxiaobai@163.com Subject: Re: [PATCH 1/3] Add a new field to struct shrinker Message-ID: <20160729130005.GE2799@techsingularity.net> References: <85a9712f3853db5d9bc14810b287c23776235f01.1468051281.git.janani.rvchndrn@gmail.com> <20160711063730.GA5284@dhcp22.suse.cz> <1468246371.13253.63.camel@surriel.com> <20160711143342.GN1811@dhcp22.suse.cz> <20160720145405.GP11249@dhcp22.suse.cz> <5e6e4f2d-ae94-130e-198d-fa402a9eef50@suse.de> <20160728054947.GL12670@dastard> <20160728102513.GA2799@techsingularity.net> <20160729001340.GM12670@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20160729001340.GM12670@dastard> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 29, 2016 at 10:13:40AM +1000, Dave Chinner wrote: > On Thu, Jul 28, 2016 at 11:25:13AM +0100, Mel Gorman wrote: > > On Thu, Jul 28, 2016 at 03:49:47PM +1000, Dave Chinner wrote: > > > Seems you're all missing the obvious. > > > > > > Add a tracepoint for a shrinker callback that includes a "name" > > > field, have the shrinker callback fill it out appropriately. e.g > > > in the superblock shrinker: > > > > > > trace_shrinker_callback(shrinker, shrink_control, sb->s_type->name); > > > > > > > That misses capturing the latency of the call unless there is a begin/end > > tracepoint. > > Sure, but I didn't see that in the email talking about how to add a > name. Even if it is a requirement, it's not necessary as we've > already got shrinker runtime measurements from the > trace_mm_shrink_slab_start and trace_mm_shrink_slab_end trace > points. With the above callback event, shrinker call runtime is > simply the time between the calls to the same shrinker within > mm_shrink_slab start/end trace points. > Fair point. It's not that hard to correlate them. > > > > My understanding was the point of the tracepoints was to get detailed > > information on points where the kernel is known to stall for long periods > > of time. > > First I've heard that's what tracepoints are supposed to be used > for. I meant the specific case of trace_X_begin followed by trace_X_end, not tracepoints in general. -- Mel Gorman SUSE Labs