This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bumming cycles out of parse_identifier()...


On Mon, Sep 10, 2001 at 05:30:26PM -0700, Zack Weinberg wrote:
> On Mon, Sep 10, 2001 at 04:09:12PM -0700, Linus Torvalds wrote:
> > In article <20010910113642.D274@codesourcery.com> you write:
> > >
> > >This lets us keep the mmap performance win for the normal case where
> > >the file is properly ended.  One potential problem is that accessing
> > >the last page of the file first may confuse the kernel into not doing
> > >read-ahead.  I don't know enough kernel architecture to say for sure.
> > >(Richard? Linus?)
> > 
> > The kernel will do read-ahead for mmap'ed areas only if the mapping has
> > ben marked sequential with madvise().  Some day in the future we _may_
> > become clever enough that we'll notice automatically (it's not that
> > hard).  But not right now. 
> 
> Hmm.  I should experiment with madvise and see if it makes a
> noticeable difference.

Obviously if you do wind up using madvise, you need to add appropriate
configure tests to check whether madvise and MADV_SEQUENTIAL are present.

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]