lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240603152419.dklvgmf6m4akdyzf@quack3>
Date: Mon, 3 Jun 2024 17:24:19 +0200
From: Jan Kara <jack@...e.cz>
To: JunChao Sun <sunjunchao2870@...il.com>
Cc: Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org, tytso@....edu,
	adilger.kernel@...ger.ca
Subject: Re: [PATCH] ext4: Adjust the layout of the ext4_inode_info structure
 to save memory.

On Mon 03-06-24 22:43:16, JunChao Sun wrote:
> Jan Kara <jack@...e.cz> 于2024年6月3日周一 22:07写道:
> >
> > On Mon 03-06-24 21:15:24, Junchao Sun wrote:
> > > Using pahole, we can see that there are some padding holes
> > > in the current ext4_inode_info structure. Adjusting the
> > > layout of ext4_inode_info can reduce these holes,
> > > resulting in the size of the structure decreasing
> > > from 2424 bytes to 2408 bytes.
> >
> >
> > > But AFAICT this will save two holes 4 bytes each so only 8 bytes in total?
> > > Not 16?
> 
> Indeed it's 16.
> Consider the layout int a; hole 0; int b; hole 1; And then move int b
> to hole 0 position, this adjustment resulted in saving 8 bytes. There
> are two adjustments like this, so it's 16. And GDB confirmed this.

Aha, OK. Thanks for clarification!

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ