From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754425AbcHSD4o (ORCPT ); Thu, 18 Aug 2016 23:56:44 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38117 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754043AbcHSD4m (ORCPT ); Thu, 18 Aug 2016 23:56:42 -0400 Date: Thu, 18 Aug 2016 16:58:36 +0200 From: Michal Hocko To: Joe Perches Cc: Andrew Morton , linux-mm@kvack.org, LKML , Jann Horn Subject: Re: [PATCH] proc, smaps: reduce printing overhead Message-ID: <20160818145835.GP30162@dhcp22.suse.cz> References: <1471519888-13829-1-git-send-email-mhocko@kernel.org> <1471526765.4319.31.camel@perches.com> <20160818142616.GN30162@dhcp22.suse.cz> <20160818144149.GO30162@dhcp22.suse.cz> <1471531563.4319.41.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471531563.4319.41.camel@perches.com> 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 Thu 18-08-16 07:46:03, Joe Perches wrote: > On Thu, 2016-08-18 at 16:41 +0200, Michal Hocko wrote: > > On Thu 18-08-16 16:26:16, Michal Hocko wrote: > > > b) doesn't it try to be overly clever when doing that in the caller > > > doesn't cost all that much? Sure you can save few bytes in the spaces > > > but then I would just argue to use \t rather than fixed string length. > > ohh, I misread the code. It tries to emulate the width formater. But is > > this really necessary? Do we know about any tools doing a fixed string > > parsing? > > I don't, but it's proc and all the output formatting > shouldn't be changed. > > Appended to is generally OK, but whitespace changed is > not good. OK fair enough, I will - seq_write(m, s, 16); + seq_puts(m, s); because smaps needs more than 16 chars and export it in fs/proc/internal.h will retest and repost. -- Michal Hocko SUSE Labs