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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140228022826.GA31809@thunk.org>
Date:	Thu, 27 Feb 2014 21:28:26 -0500
From:	Theodore Ts'o <tytso@....edu>
To:	Phillip Susi <psusi@...ntu.com>
Cc:	Andreas Dilger <adilger@...ger.ca>,
	"Darrick J. Wong" <darrick.wong@...cle.com>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 2/2] libext2fs/e2fsck: implement metadata prefetching

On Thu, Feb 27, 2014 at 12:03:56PM -0500, Phillip Susi wrote:
> 
> Why build your own cache instead of letting the kernel take care of
> it?  I  believe the IO elevator already gives preferential treatment
> to blocking reads so just using readahead() to prefetch and sticking
> with plain old read() should work nicely.

The reason why it might be better for us to use our own cache is
because we can more accurately know when we're done with the block,
and we can drop it from the cache.

I suppose we could use posix_fadvise(POSIX_FADV_DONTNEED) --- and
hopefully this works on block devices for the buffer cache, but it
wouldn't all surprise me that if we can get finer-grained control if
we use O_DIRECT and manage the buffers ourselves.  Whether it's worth
the extra complexitry is a fair question --- but simply adding
metadata prefetching is going to add a fair amount of complexity
already, and we should test to make sure that readahead() and
posix_fadvise() actually work correctly on block devices --- a couple
of years ago, I had explored readahead() precisely as a cheap way of
adding metadata precaching for e2fsck, and it was a no-op when I tried
the test back then.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ