From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>, Jan Kara <jack@suse.cz>,
Wu Fengguang <fengguang.wu@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
<linux-fsdevel@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/9] readahead: tag metadata call sites
Date: Fri, 27 Jan 2012 11:05:28 +0800 [thread overview]
Message-ID: <20120127031326.881533433@intel.com> (raw)
In-Reply-To: 20120127030524.854259561@intel.com
[-- Attachment #1: readahead-for-metadata --]
[-- Type: text/plain, Size: 2281 bytes --]
We may be doing more metadata readahead in future.
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
fs/ext3/dir.c | 1 +
fs/ext4/dir.c | 1 +
include/linux/fs.h | 1 +
mm/readahead.c | 1 +
4 files changed, 4 insertions(+)
--- linux-next.orig/fs/ext3/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext3/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -136,6 +136,7 @@ static int ext3_readdir(struct file * fi
pgoff_t index = map_bh.b_blocknr >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/fs/ext4/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext4/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -153,6 +153,7 @@ static int ext4_readdir(struct file *fil
pgoff_t index = map.m_pblk >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/include/linux/fs.h 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/include/linux/fs.h 2012-01-25 15:57:52.000000000 +0800
@@ -955,6 +955,7 @@ struct file_ra_state {
u16 mmap_miss; /* Cache miss stat for mmap accesses */
u8 pattern; /* one of RA_PATTERN_* */
unsigned int for_mmap:1; /* readahead for mmap accesses */
+ unsigned int for_metadata:1; /* readahead for meta data */
loff_t prev_pos; /* Cache last read() position */
};
--- linux-next.orig/mm/readahead.c 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/mm/readahead.c 2012-01-25 15:57:52.000000000 +0800
@@ -260,6 +260,7 @@ unsigned long ra_submit(struct file_ra_s
ra->start, ra->size, ra->async_size);
ra->for_mmap = 0;
+ ra->for_metadata = 0;
return actual;
}
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>, Jan Kara <jack@suse.cz>,
Wu Fengguang <fengguang.wu@intel.com>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/9] readahead: tag metadata call sites
Date: Fri, 27 Jan 2012 11:05:28 +0800 [thread overview]
Message-ID: <20120127031326.881533433@intel.com> (raw)
In-Reply-To: 20120127030524.854259561@intel.com
[-- Attachment #1: readahead-for-metadata --]
[-- Type: text/plain, Size: 2281 bytes --]
We may be doing more metadata readahead in future.
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
fs/ext3/dir.c | 1 +
fs/ext4/dir.c | 1 +
include/linux/fs.h | 1 +
mm/readahead.c | 1 +
4 files changed, 4 insertions(+)
--- linux-next.orig/fs/ext3/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext3/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -136,6 +136,7 @@ static int ext3_readdir(struct file * fi
pgoff_t index = map_bh.b_blocknr >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/fs/ext4/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext4/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -153,6 +153,7 @@ static int ext4_readdir(struct file *fil
pgoff_t index = map.m_pblk >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/include/linux/fs.h 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/include/linux/fs.h 2012-01-25 15:57:52.000000000 +0800
@@ -955,6 +955,7 @@ struct file_ra_state {
u16 mmap_miss; /* Cache miss stat for mmap accesses */
u8 pattern; /* one of RA_PATTERN_* */
unsigned int for_mmap:1; /* readahead for mmap accesses */
+ unsigned int for_metadata:1; /* readahead for meta data */
loff_t prev_pos; /* Cache last read() position */
};
--- linux-next.orig/mm/readahead.c 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/mm/readahead.c 2012-01-25 15:57:52.000000000 +0800
@@ -260,6 +260,7 @@ unsigned long ra_submit(struct file_ra_s
ra->start, ra->size, ra->async_size);
ra->for_mmap = 0;
+ ra->for_metadata = 0;
return actual;
}
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>, Jan Kara <jack@suse.cz>,
Wu Fengguang <fengguang.wu@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
<linux-fsdevel@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/9] readahead: tag metadata call sites
Date: Fri, 27 Jan 2012 11:05:28 +0800 [thread overview]
Message-ID: <20120127031326.881533433@intel.com> (raw)
In-Reply-To: 20120127030524.854259561@intel.com
[-- Attachment #1: readahead-for-metadata --]
[-- Type: text/plain, Size: 1978 bytes --]
We may be doing more metadata readahead in future.
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
fs/ext3/dir.c | 1 +
fs/ext4/dir.c | 1 +
include/linux/fs.h | 1 +
mm/readahead.c | 1 +
4 files changed, 4 insertions(+)
--- linux-next.orig/fs/ext3/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext3/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -136,6 +136,7 @@ static int ext3_readdir(struct file * fi
pgoff_t index = map_bh.b_blocknr >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/fs/ext4/dir.c 2012-01-25 15:57:46.000000000 +0800
+++ linux-next/fs/ext4/dir.c 2012-01-25 15:57:52.000000000 +0800
@@ -153,6 +153,7 @@ static int ext4_readdir(struct file *fil
pgoff_t index = map.m_pblk >>
(PAGE_CACHE_SHIFT - inode->i_blkbits);
if (!ra_has_index(&filp->f_ra, index))
+ filp->f_ra.for_metadata = 1;
page_cache_sync_readahead(
sb->s_bdev->bd_inode->i_mapping,
&filp->f_ra, filp,
--- linux-next.orig/include/linux/fs.h 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/include/linux/fs.h 2012-01-25 15:57:52.000000000 +0800
@@ -955,6 +955,7 @@ struct file_ra_state {
u16 mmap_miss; /* Cache miss stat for mmap accesses */
u8 pattern; /* one of RA_PATTERN_* */
unsigned int for_mmap:1; /* readahead for mmap accesses */
+ unsigned int for_metadata:1; /* readahead for meta data */
loff_t prev_pos; /* Cache last read() position */
};
--- linux-next.orig/mm/readahead.c 2012-01-25 15:57:51.000000000 +0800
+++ linux-next/mm/readahead.c 2012-01-25 15:57:52.000000000 +0800
@@ -260,6 +260,7 @@ unsigned long ra_submit(struct file_ra_s
ra->start, ra->size, ra->async_size);
ra->for_mmap = 0;
+ ra->for_metadata = 0;
return actual;
}
next prev parent reply other threads:[~2012-01-27 3:05 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 3:05 [PATCH 0/9] readahead stats/tracing, backwards prefetching and more (v4) Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 1/9] readahead: make context readahead more conservative Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 2/9] readahead: record readahead patterns Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 3/9] readahead: tag mmap page fault call sites Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang [this message]
2012-01-27 3:05 ` [PATCH 4/9] readahead: tag metadata " Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 5/9] readahead: add vfs/readahead tracing event Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 6/9] readahead: add /debug/readahead/stats Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 16:21 ` Christoph Lameter
2012-01-27 16:21 ` Christoph Lameter
2012-01-27 20:15 ` Andrew Morton
2012-01-27 20:15 ` Andrew Morton
2012-01-29 5:07 ` Wu Fengguang
2012-01-29 5:07 ` Wu Fengguang
2012-01-30 4:02 ` Dave Chinner
2012-01-30 4:02 ` Dave Chinner
2012-01-27 3:05 ` [PATCH 7/9] readahead: basic support for backwards prefetching Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 8/9] readahead: dont do start-of-file readahead after lseek() Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` [PATCH 9/9] readahead: snap readahead request to EOF Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-01-27 3:05 ` Wu Fengguang
2012-02-09 3:22 ` [PATCH 6/9 update changelog] readahead: add /debug/readahead/stats Wu Fengguang
2012-02-09 3:22 ` Wu Fengguang
-- strict thread matches above, loose matches on Subject: below --
2012-02-11 4:31 [PATCH 0/9] readahead stats/tracing, backwards prefetching and more (v5) Wu Fengguang
2012-02-11 4:31 ` [PATCH 4/9] readahead: tag metadata call sites Wu Fengguang
2012-02-11 4:31 ` Wu Fengguang
2012-02-11 4:31 ` Wu Fengguang
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=20120127031326.881533433@intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=jack@suse.cz \
/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.