From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761137AbcALAVA (ORCPT ); Mon, 11 Jan 2016 19:21:00 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34340 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760272AbcALAU6 (ORCPT ); Mon, 11 Jan 2016 19:20:58 -0500 Date: Mon, 11 Jan 2016 16:20:56 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Xishi Qiu cc: Michal Hocko , cl@linux.com, Pekka Enberg , iamjoonsoo.kim@lge.com, Andrew Morton , zhong jiang , Linux MM , LKML Subject: Re: [PATCH] mm: add ratio in slabinfo print In-Reply-To: <5693AAD5.6090101@huawei.com> Message-ID: References: <56932791.3080502@huawei.com> <20160111122553.GB27317@dhcp22.suse.cz> <5693AAD5.6090101@huawei.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jan 2016, Xishi Qiu wrote: > > On Mon 11-01-16 11:54:57, Xishi Qiu wrote: > >> Add ratio(active_objs/num_objs) in /proc/slabinfo, it is used to show > >> the availability factor in each slab. > > > > What is the reason to add such a new value when it can be trivially > > calculated from the userspace? > > > > Besides that such a change would break existing parsers no? > > Oh, maybe it is. > If you need the information internally, you could always create a library around slabinfo and export the information for users who are interested for your own use. Doing anything other than appending fields to each line is too dangerous, however, as a general rule.