From: Ashif Harji <asharji@cs.uwaterloo.ca>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, npiggin@suse.de
Subject: Re: do_generic_mapping_read performance issue
Date: Mon, 12 Mar 2007 12:46:47 -0400 (EDT) [thread overview]
Message-ID: <Pine.GSO.4.64.0703121230520.7679@cpu102.cs.uwaterloo.ca> (raw)
In-Reply-To: <20070312142012.GH30777@atrey.karlin.mff.cuni.cz>
>> The implication of this code is that for files of size less than or equal
>> to a single page, the page associated with such a file is likely to get
>> evicted from the cache regardless of how frequently it is accessed. The
>> reason is that after the first access, prev_index is always zero and index
>> can only be zero. Hence, mark_page_accessed is never called after the
>> first time the file is requested. As a result, the page is evicted from
>> the cache no matter how frequently it is used. By changing the kernel to
>> always call mark_page_accessed for these files, the server throughput is
>> increased by as much as 20%.
> Your analysis seems to be right. But to observe this behaviour you have
> to have the file open and just always reread it using the same file
> descriptor, don't you? That's probably not too common...
Yes, this problem requires the file to be accessed via the same file
descriptor. I suspect this behaviour is common for a certain class of
applications, e.g., web servers. However, any application that read from
the same page repeatedly would also experience this problem. It is more
likely to occur with small files, but not exculsively.
ashif.
prev parent reply other threads:[~2007-03-12 16:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 22:03 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 20:55 ` Dave Kleikamp
2007-03-14 21:33 ` Andreas Mohr
2007-03-14 22:08 ` Dave Kleikamp
2007-03-15 1:36 ` Xiaoning Ding
2007-03-15 5:22 ` Ashif Harji
2007-03-15 12:46 ` Dave Kleikamp
2007-03-15 12:50 ` Nick Piggin
2007-03-15 19:07 ` Andrew Morton
2007-03-15 21:49 ` Andrea Arcangeli
2007-03-15 22:06 ` Andrew Morton
2007-03-15 23:15 ` Andrea Arcangeli
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-16 3:51 ` Valdis.Kletnieks
2007-03-16 4:09 ` Rik van Riel
2007-03-16 14:20 ` Anton Blanchard
2007-03-15 10:39 ` Peter Zijlstra
2007-03-15 12:38 ` Nick Piggin
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 17:04 ` Rik van Riel
2007-03-15 17:44 ` Hugh Dickins
2007-03-15 20:01 ` Nick Piggin
2007-03-15 22:59 ` Andrea Arcangeli
2007-03-15 23:15 ` Dave Kleikamp
2007-03-15 23:28 ` Andrea Arcangeli
2007-03-15 19:55 ` Ashif Harji
2007-03-15 20:07 ` Nick Piggin
2007-03-15 20:31 ` Andreas Mohr
2007-03-12 16:46 ` Ashif Harji [this message]
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=Pine.GSO.4.64.0703121230520.7679@cpu102.cs.uwaterloo.ca \
--to=asharji@cs.uwaterloo.ca \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®