From: Andrea Arcangeli <andrea@suse.de>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>,
Chuck Ebbert <cebbert@redhat.com>,
Ashif Harji <asharji@cs.uwaterloo.ca>,
Miquel van Smoorenburg <miquels@cistron.nl>,
linux-mm@kvack.org, Jan Kara <jack@suse.cz>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed
Date: Fri, 16 Mar 2007 00:28:37 +0100 [thread overview]
Message-ID: <20070315232837.GH6687@v2.random> (raw)
In-Reply-To: <1174000545.14380.22.camel@kleikamp.austin.ibm.com>
On Thu, Mar 15, 2007 at 06:15:45PM -0500, Dave Kleikamp wrote:
> On Thu, 2007-03-15 at 23:59 +0100, Andrea Arcangeli wrote:
> > On Thu, Mar 15, 2007 at 05:44:01PM +0000, Hugh Dickins wrote:
> > > who removed the !offset condition, he should be consulted on its
> > > reintroduction.
> >
> > the !offset check looks a pretty broken heuristic indeed, it would
> > break random I/O.
>
> I wouldn't call it broken. At worst, I'd say it's imperfect. But
> that's the nature of a heuristic. It most likely works in a huge
> majority of cases.
well, IMHO in the huge majority of cases the prev_page check isn't
necessary in the first place (and IMHO it hurts a lot more than it can
help, as demonstrated by specweb, since we'll bite on the good guys to
help the bad guys).
The only case where I can imagine the prev_page to make sense is to
handle contiguous I/O made with a small buffer, so clearly an
inefficient code in the first place. But if this guy is reading with
<PAGE_SIZE buffer there's no guarantee that he's reading f_pos aligned
either, hence the need of taking last_offset into account too so at
least it's a "perfect" heuristic that will reliably detect contiguous
I/O no matter in what shape or form you execute it, as long as it is
contiguous I/O.
Any other variation of behavior besides the autodetection of
contiguous I/O run in whatever buffer/aligned form, should be mandated
by userland through fadvise/madvise IMHO or we run into the toes of
the good guys.
WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <andrea@suse.de>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>,
Chuck Ebbert <cebbert@redhat.com>,
Ashif Harji <asharji@cs.uwaterloo.ca>,
Miquel van Smoorenburg <miquels@cistron.nl>,
linux-mm@kvack.org, Jan Kara <jack@suse.cz>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed
Date: Fri, 16 Mar 2007 00:28:37 +0100 [thread overview]
Message-ID: <20070315232837.GH6687@v2.random> (raw)
In-Reply-To: <1174000545.14380.22.camel@kleikamp.austin.ibm.com>
On Thu, Mar 15, 2007 at 06:15:45PM -0500, Dave Kleikamp wrote:
> On Thu, 2007-03-15 at 23:59 +0100, Andrea Arcangeli wrote:
> > On Thu, Mar 15, 2007 at 05:44:01PM +0000, Hugh Dickins wrote:
> > > who removed the !offset condition, he should be consulted on its
> > > reintroduction.
> >
> > the !offset check looks a pretty broken heuristic indeed, it would
> > break random I/O.
>
> I wouldn't call it broken. At worst, I'd say it's imperfect. But
> that's the nature of a heuristic. It most likely works in a huge
> majority of cases.
well, IMHO in the huge majority of cases the prev_page check isn't
necessary in the first place (and IMHO it hurts a lot more than it can
help, as demonstrated by specweb, since we'll bite on the good guys to
help the bad guys).
The only case where I can imagine the prev_page to make sense is to
handle contiguous I/O made with a small buffer, so clearly an
inefficient code in the first place. But if this guy is reading with
<PAGE_SIZE buffer there's no guarantee that he's reading f_pos aligned
either, hence the need of taking last_offset into account too so at
least it's a "perfect" heuristic that will reliably detect contiguous
I/O no matter in what shape or form you execute it, as long as it is
contiguous I/O.
Any other variation of behavior besides the autodetection of
contiguous I/O run in whatever buffer/aligned form, should be mandated
by userland through fadvise/madvise IMHO or we run into the toes of
the good guys.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-03-15 23:29 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 22:03 do_generic_mapping_read performance issue Ashif Harji
2007-03-12 14:20 ` Jan Kara
2007-03-12 14:39 ` Nick Piggin
2007-03-12 15:13 ` Jan Kara
2007-03-12 17:05 ` Ashif Harji
2007-03-12 17:35 ` Jan Kara
2007-03-13 18:43 ` Ashif Harji
2007-03-13 18:55 ` Jan Kara
2007-03-14 19:58 ` [PATCH] mm/filemap.c: unconditionally call mark_page_accessed Ashif Harji
2007-03-14 19:58 ` Ashif Harji
2007-03-14 20:55 ` Dave Kleikamp
2007-03-14 20:55 ` Dave Kleikamp
2007-03-14 21:33 ` Andreas Mohr
2007-03-14 21:33 ` Andreas Mohr
2007-03-14 22:08 ` Dave Kleikamp
2007-03-14 22:08 ` Dave Kleikamp
2007-03-15 1:36 ` Xiaoning Ding
2007-03-15 1:36 ` Xiaoning Ding
2007-03-15 5:22 ` Ashif Harji
2007-03-15 5:22 ` Ashif Harji
2007-03-15 12:46 ` Dave Kleikamp
2007-03-15 12:46 ` Dave Kleikamp
2007-03-15 12:50 ` Nick Piggin
2007-03-15 12:50 ` Nick Piggin
2007-03-15 19:07 ` Andrew Morton
2007-03-15 19:07 ` Andrew Morton
2007-03-15 21:49 ` Andrea Arcangeli
2007-03-15 21:49 ` Andrea Arcangeli
2007-03-15 22:06 ` Andrew Morton
2007-03-15 22:06 ` Andrew Morton
2007-03-15 23:15 ` Andrea Arcangeli
2007-03-15 23:15 ` Andrea Arcangeli
2007-03-15 15:00 ` Rik van Riel
2007-03-15 15:00 ` Rik van Riel
2007-03-15 17:37 ` Valdis.Kletnieks
2007-03-15 18:35 ` Rik van Riel
2007-03-15 18:35 ` Rik van Riel
2007-03-16 3:51 ` Valdis.Kletnieks
2007-03-16 4:09 ` Rik van Riel
2007-03-16 4:09 ` Rik van Riel
2007-03-16 14:20 ` Anton Blanchard
2007-03-16 14:20 ` Anton Blanchard
2007-03-15 10:39 ` Peter Zijlstra
2007-03-15 10:39 ` Peter Zijlstra
2007-03-15 12:38 ` Nick Piggin
2007-03-15 12:38 ` Nick Piggin
2007-03-15 15:06 ` Rik van Riel
2007-03-15 15:06 ` Rik van Riel
2007-03-15 15:56 ` Chuck Ebbert
2007-03-15 16:29 ` Nick Piggin
2007-03-15 16:29 ` Nick Piggin
2007-03-15 17:04 ` Rik van Riel
2007-03-15 17:04 ` Rik van Riel
2007-03-15 17:44 ` Hugh Dickins
2007-03-15 17:44 ` Hugh Dickins
2007-03-15 20:01 ` Nick Piggin
2007-03-15 20:01 ` Nick Piggin
2007-03-15 22:59 ` Andrea Arcangeli
2007-03-15 22:59 ` Andrea Arcangeli
2007-03-15 23:15 ` Dave Kleikamp
2007-03-15 23:15 ` Dave Kleikamp
2007-03-15 23:28 ` Andrea Arcangeli [this message]
2007-03-15 23:28 ` Andrea Arcangeli
2007-03-15 19:55 ` Ashif Harji
2007-03-15 19:55 ` Ashif Harji
2007-03-15 20:07 ` Nick Piggin
2007-03-15 20:07 ` Nick Piggin
2007-03-15 20:31 ` Andreas Mohr
2007-03-15 20:31 ` Andreas Mohr
2007-03-12 16:46 ` do_generic_mapping_read performance issue Ashif Harji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070315232837.GH6687@v2.random \
--to=andrea@suse.de \
--cc=akpm@linux-foundation.org \
--cc=asharji@cs.uwaterloo.ca \
--cc=cebbert@redhat.com \
--cc=hugh@veritas.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miquels@cistron.nl \
--cc=npiggin@suse.de \
--cc=shaggy@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.