From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:52853 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbeEAPmV (ORCPT ); Tue, 1 May 2018 11:42:21 -0400 Date: Tue, 1 May 2018 17:39:45 +0200 From: David Sterba To: Timofey Titovets Cc: David Sterba , linux-btrfs Subject: Re: [PATCH 4/4] [RESEND] Btrfs: reduce size of struct btrfs_inode Message-ID: <20180501153945.GW21272@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20180424233717.31283-1-nefelim4ag@gmail.com> <20180424233717.31283-5-nefelim4ag@gmail.com> <20180426134206.GV21272@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Sat, Apr 28, 2018 at 10:01:57AM +0000, Timofey Titovets wrote: > May be i misunderstood something, but i was think that slab combine > several pages in continuous range, so object in slab can cross page > boundary. So, all calculation will be very depends on scale of slab > size. > > i.e. on my machine that looks quite different: > name > btrfs_inode 142475 146272 1136 28 8 > > So, > PAGE_SIZE * pagesperslab / objperslab > 4096 * 8 / 28 = 1170.28 > > 4096*8 - 1136*28 = 960 > > That's looks like object can cross page boundary in slab. > So, if size reduced to 1128, > 4096 * 8 / 29 = 1129.93 > 4096*8 - 1128*29 = 56 > > Did i miss something? Then this depends on the allocator, SLAB does 4k pages and SLUB 32k, so there's a value in reducing the inode size.