All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Andreas Dilger <adilger@whamcloud.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 4/9] e2fsck: reduce memory usage for many directories
Date: Sat, 29 Feb 2020 18:29:14 -0500	[thread overview]
Message-ID: <20200229232914.GD38945@mit.edu> (raw)
In-Reply-To: <1581037786-62789-4-git-send-email-adilger@whamcloud.com>

On Thu, Feb 06, 2020 at 06:09:41PM -0700, Andreas Dilger wrote:
> Pack struct dx_dir_info and dx_dirblock_info properly in memory, to
> avoid holes, and fields are not larger than necessary.  This reduces
> the memory needed for each hashed dir, according to pahole(1) from:
> 
>     struct dx_dir_info {
>         /* size: 32, cachelines: 1, members: 6 */
>         /* sum members: 26, holes: 1, sum holes: 2 */
>         /* padding: 4 */
>     };
>     struct dx_dirblock_info {
>         /* size: 56, cachelines: 1, members: 9 */
>         /* sum members: 48, holes: 2, sum holes: 8 */
>         /* last cacheline: 56 bytes */
>     };
> 
> to 8 bytes less for each directory and directory block, and leaves
> space for future use if needed (e.g. larger numblocks):
> 
>     struct dx_dir_info {
>         /* size: 24, cachelines: 1, members: 6 */
>         /* sum members: 20, holes: 1, sum holes: 4 */
>         /* bit holes: 1, sum bit holes: 7 bits */
>     };
>     struct dx_dirblock_info {
>         /* size: 48, cachelines: 1, members: 9 */
>     };
> 
> Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
> Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197

Applied, thanks.

					- Ted

  reply	other threads:[~2020-02-29 23:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  1:09 [PATCH 1/9] e2fsck: fix e2fsck_allocate_memory() overflow Andreas Dilger
2020-02-07  1:09 ` [PATCH 2/9] e2fsck: use proper types for variables Andreas Dilger
2020-02-29 23:27   ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 3/9] e2fsck: avoid mallinfo() if over 2GB allocated Andreas Dilger
2020-02-29 23:28   ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 4/9] e2fsck: reduce memory usage for many directories Andreas Dilger
2020-02-29 23:29   ` Theodore Y. Ts'o [this message]
2020-02-07  1:09 ` [PATCH 5/9] debugfs: allow comment lines in command file Andreas Dilger
2020-02-29 23:32   ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 6/9] debugfs: print inode numbers as unsigned Andreas Dilger
2020-02-29 23:34   ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 7/9] e2fsck: fix overflow if more than 4B inodes Andreas Dilger
2020-02-29 23:35   ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 8/9] e2fsck: consistently use ext2fs_get_mem() Andreas Dilger
2020-02-29 23:36   ` Theodore Y. Ts'o
2020-03-04 23:23     ` Theodore Y. Ts'o
2020-02-07  1:09 ` [PATCH 9/9] misc: handle very large files with filefrag Andreas Dilger
2020-03-04 23:27   ` Theodore Y. Ts'o
2020-02-12  0:58 ` [PATCH] " Andreas Dilger
2020-02-12  1:09   ` Andreas Dilger
2020-02-12  1:07 ` [PATCH] e2fsck: avoid overflow with very large dirs Andreas Dilger
2020-03-04 23:39   ` Theodore Y. Ts'o
2020-02-29 23:25 ` [PATCH 1/9] e2fsck: fix e2fsck_allocate_memory() overflow Theodore Y. Ts'o

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=20200229232914.GD38945@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@whamcloud.com \
    --cc=linux-ext4@vger.kernel.org \
    /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.