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>] [day] [month] [year] [list]
Date:	Sat, 1 Nov 2008 10:33:58 +0800
From:	Wu Fengguang <fengguang.wu@...il.com>
To:	John Galloway <John.Galloway@...res.com>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: readahead in the 2.6.25+ kernel

Hi John,

On Fri, Oct 31, 2008 at 09:00:30PM -0400, John Galloway wrote:
> 
> Hi,
> 
>   I'm looking into read ahead issues wrt Ingres, particularly wrt mmap.
> I gather (but am not sure) your readahead patches have been incorporated
> into the 2.6 kernel around 2.6.15, with some simplfications it seems??
> Are you still maintaining a distinct patch set?

The ondemand readahead patch series have been merged into linux 2.6.23/24.
So I no longer maintain out-of-tree readahead patches.

>   And can you help me out about how linux readahead will effect mmap() as
> opposed to read()?  i.e. is it enabled for mmap() as well?

No, mmap readahead is always a dumb and simple 'read-around' one, and
it seems there is no general interest on improving it.

Currently you have two options to affect mmap readahead performance:
- tune readahead size with command `blockdev --setra'
- tell kernel to use the ondemand readahead routines with
  madvise(MADV_SEQUENTIAL)

Note that MADV_SEQUENTIAL is safe to use at least for the current
readahead implementation, it won't blindly do aggressive readahead on
seeing MADV_SEQUENTIAL. The flag only switches the readahead routine
from the dumb read-around one to the somehow smarter readahead logic,
which _detects_ sequential patterns for us.

As a long term solution, if you get favorable numbers with MADV_SEQUENTIAL,
that could be a 'first impetus' to improve the default mmap readahead code ;-)

Cheers,
Fengguang

--
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