From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 Date: Fri, 26 Aug 2011 17:23:34 +0300 Message-ID: <20110826142334.GA26675@shutemov.name> References: <20110825170147.GM2803@mtj.dyndns.org> <20110825170705.GA6387@sun> <20110825205426.GO2803@mtj.dyndns.org> <20110825211213.GP2803@mtj.dyndns.org> <20110825213459.GA1929@sun> <20110825213931.GR2803@mtj.dyndns.org> <20110826112943.GI3903@sun> <20110826122851.GA25853@shutemov.name> <20110826131620.GM3903@sun> <20110826140620.GE2632@htj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Cyrill Gorcunov , Andrew Morton , Pavel Emelyanov , linux-kernel@vger.kernel.org, James Bottomley , containers@lists.osdl.org, Andi Kleen , Nathan Lynch , LINUXFS-ML , Zan Lynx , Daniel Lezcano , Vasiliy Kulikov To: Tejun Heo Return-path: Received: from shutemov.name ([188.40.19.243]:33073 "EHLO shutemov.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047Ab1HZOXf (ORCPT ); Fri, 26 Aug 2011 10:23:35 -0400 Content-Disposition: inline In-Reply-To: <20110826140620.GE2632@htj.dyndns.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Aug 26, 2011 at 04:06:20PM +0200, Tejun Heo wrote: > > +struct map_files_info { > > + struct file *file; > > + unsigned char name[16+16+2]; /* max: %016lx-%016lx\0 */ > > + unsigned long len; > > +}; > > That's slightly above 50 bytes. We can use 4 * sizeof(unsigned long) + 2 for name to save a bit on 32 bit architectures. BTW, show_map_vma() uses "%08lx-%08lx" to print ->start, ->end. I think it's good idea to use this here as well to be consistent with /proc/$PID/{s,}maps -- Kirill A. Shutemov