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: <20100104121642.GA12266@localhost>
Date:	Mon, 4 Jan 2010 20:16:42 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Quentin Barnes <qbarnes+nfs@...oo-inc.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Nick Piggin <npiggin@...e.de>,
	Steven Whitehouse <swhiteho@...hat.com>,
	David Howells <dhowells@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Jonathan Corbet <corbet@....net>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [RFC][PATCH v3] readahead: introduce O_RANDOM for
	POSIX_FADV_RANDOM

Hi Minchan,

On Mon, Jan 04, 2010 at 01:20:49PM +0800, Minchan Kim wrote:
> > --- linux.orig/mm/readahead.c   2010-01-04 12:39:29.000000000 +0800
> > +++ linux/mm/readahead.c        2010-01-04 12:39:30.000000000 +0800
> > @@ -501,6 +501,12 @@ void page_cache_sync_readahead(struct ad
> >        if (!ra->ra_pages)
> >                return;
> >
> > +       /* be dumb */
> > +       if (filp->f_flags & O_RANDOM) {
> > +               force_page_cache_readahead(mapping, filp, offset, req_size);
> > +               return;
> > +       }
> > +
> 
> Let me have a dumb question. :)
> 
> How about testing O_RANDOM in front of ra_pages testing?
> 
> My intention is that although we turn off ra, it would be better to read
> contiguous block all at once than readpage() callback doing I/O
> one page at a time.
> 
> Is it break some semantics or happen some problem in ondemand readahead?

Yes it will have some problem with shrink_readahead_size_eio(), which
want to disable readahead and use ->readpage() when ra_pages==0.

Do you have specific use case in mind? The file systems that set
ra_pages=0 seems to don't need readahead, too. 

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ