From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761860AbcALBFu (ORCPT ); Mon, 11 Jan 2016 20:05:50 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:14079 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbcALBFt (ORCPT ); Mon, 11 Jan 2016 20:05:49 -0500 Message-ID: <56945142.5040509@huawei.com> Date: Tue, 12 Jan 2016 09:05:06 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: David Rientjes CC: Michal Hocko , , Pekka Enberg , , Andrew Morton , zhong jiang , Linux MM , LKML Subject: Re: [PATCH] mm: add ratio in slabinfo print References: <56932791.3080502@huawei.com> <20160111122553.GB27317@dhcp22.suse.cz> <5693AAD5.6090101@huawei.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.56945165.00CE,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b6a047cb389827df8eec451bf5f1495d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/12 8:20, David Rientjes wrote: > 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. > > OK, I know. Thanks, Xishi Qiu