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]
Date:	Thu, 14 May 2015 14:46:49 +0200
From:	Jan Kara <jack@...e.cz>
To:	Dave Chinner <david@...morbit.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Christoph Hellwig <hch@...radead.org>,
	Neil Brown <neilb@...e.de>
Subject: Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU
 symlinks

On Thu 14-05-15 21:23:04, Dave Chinner wrote:
> On Wed, May 13, 2015 at 08:52:59PM -0700, Linus Torvalds wrote:
> > And readdir() itself, for that matter - we have no good vfs-level
> > readdir caching, so it all ends up serialized on the inode
> > semaphore, and it all goes all the way into the filesystem to get
> > the readdir data.  And at least for ext4, readdir()
> > is slow anyway, because it doesn't use the page cache, it uses
> > that good old buffer cache, because of how ext4 does metadata
> > journaling etc.
> 
> IIRC, ext4 readdir is not slow because of the use of the buffer
> cache, it's slow because of the way it hashes dirents across blocks
> on disk.  i.e. it has locality issues, not a caching problem.
  For ext4 readdir is just a linear read of the directory. Linus is right
we store directory blocks in buffer cache but we do our own readahead on
directory blocks so I don't think much slowness comes from that. One
thing that is slowing us down is that we don't do preallocation for
directories so they often end up being fragmented a lot.

The locality problem you are probably referring to is that readdir on ext4
returns directory entries in hash order. That is different from the
ordering by inode number which is optimal for the following cache-cold stat
/ unlink / whatever you want to do with inodes. This causes big performance
issues e.g. if you do rm -rf on large directory hierarchy. But you don't
see that often these days as lots of utilities have learned to workaround
ext4 problems by sorting directory entries by inode number before doing
anything with them.

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ