All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Timofey Titovets <nefelim4ag@gmail.com>
Cc: David Sterba <dsterba@suse.cz>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 4/4] [RESEND] Btrfs: reduce size of struct btrfs_inode
Date: Tue, 1 May 2018 17:39:45 +0200	[thread overview]
Message-ID: <20180501153945.GW21272@twin.jikos.cz> (raw)
In-Reply-To: <CAGqmi75LLs9T9HEJQEx53HMKCvHPjM7jDKPBELpdv6hmaVhvWw@mail.gmail.com>

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                    <active_objs>  <num_objs>  <objsize>  <objperslab>   <pagesperslab>
> 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.

      reply	other threads:[~2018-05-01 15:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 23:37 [PATCH 0/4] [RESEND] Btrfs: just bunch of patches to ioctl.c Timofey Titovets
2018-04-24 23:37 ` [PATCH 1/4] [RESEND] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction Timofey Titovets
2018-04-26 14:03   ` David Sterba
2018-04-28  9:35     ` Timofey Titovets
2018-04-24 23:37 ` [PATCH 2/4] [RESEND] Btrfs: make should_defrag_range() understood compressed extents Timofey Titovets
2018-04-24 23:37 ` [PATCH 3/4] [RESEND] Btrfs: allow btrfs_defrag_file() uncompress files on defragmentation Timofey Titovets
2018-04-24 23:37 ` [PATCH 4/4] [RESEND] Btrfs: reduce size of struct btrfs_inode Timofey Titovets
2018-04-26 13:42   ` David Sterba
2018-04-28 10:01     ` Timofey Titovets
2018-05-01 15:39       ` David Sterba [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180501153945.GW21272@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nefelim4ag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.