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] [day] [month] [year] [list]
Message-ID: <20191130004950.GB16443@mit.edu>
Date:   Fri, 29 Nov 2019 19:49:50 -0500
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Andreas Dilger <adilger.kernel@...ger.ca>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: Unnecessarily bad cache behavior for ext4_getattr()

On Sun, Nov 24, 2019 at 04:19:16PM -0800, Linus Torvalds wrote:
> It looks from profiles like ext4_getattr() is fairly expensive,
> because it unnecessarily accesses the extended inode information and
> causes extra cache misses.
> 
> On an empty kernel allmodconfig build (which is a lot of "stat()"
> calls by Make, and a lot of silly string stuff in user space due to
> all the make variable games we play), ext4_getattr() was something
> like 1% of the time according to the profile I gathered. It might be
> bogus - maybe the cacheline ends up being accessed later anyway, but
> it _looked_ like it was the whole "i_extra_isize" access that missed
> in the cache.
> 
> That's all for gathering the STATX_BTIME information, that the caller
> doesn't even *want*.
> 
> How about a patch like the attached?

Looks good, thanks, I've applied it to the ext4 tree.

I'm a bit surprised a cache line miss rated that high on a kernel
build, but that probably says a lot about how efficient the rest of
the kernel was (and I assume Make didn't need to rebuild most of the
object files).

					- Ted

P.S.  Did you see the ext4 pull request?  I wasn't sure if you haven't
gotten to it yet due to being distracted by Turkey day or not...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ