From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754507AbcGTOyT (ORCPT ); Wed, 20 Jul 2016 10:54:19 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37517 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbcGTOyL (ORCPT ); Wed, 20 Jul 2016 10:54:11 -0400 Date: Wed, 20 Jul 2016 16:54:05 +0200 From: Michal Hocko To: Janani Ravichandran Cc: 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, mgorman@techsingularity.net, kirill.shutemov@linux.intel.com, bywxiaobai@163.com Subject: Re: [PATCH 1/3] Add a new field to struct shrinker Message-ID: <20160720145405.GP11249@dhcp22.suse.cz> References: <85a9712f3853db5d9bc14810b287c23776235f01.1468051281.git.janani.rvchndrn@gmail.com> <20160711063730.GA5284@dhcp22.suse.cz> <1468246371.13253.63.camel@surriel.com> <20160711143342.GN1811@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 20-07-16 20:11:09, Janani Ravichandran wrote: > > > On Jul 11, 2016, at 8:03 PM, Michal Hocko wrote: > > > > On Mon 11-07-16 10:12:51, Rik van Riel wrote: > >> > >> What mechanism do you have in mind for obtaining the name, > >> Michal? > > > > Not sure whether tracing infrastructure allows printk like %ps. If not > > then it doesn't sound too hard to add. > > It does allow %ps. Currently what is being printed is the function symbol > of the callback using %pF. I’d like to know why %pF is used instead of > %ps in this case. >>From a quick look into the code %pF should be doing the same thing as %ps in the end. Some architectures just need some magic to get a proper address of the function. > Michal, just to make sure I understand you correctly, do you mean that we > could infer the names of the shrinkers by looking at the names of their callbacks? Yes, %ps can then be used for the name of the shrinker structure (assuming it is available). -- Michal Hocko SUSE Labs