[RFC][PATCH] on-demand readahead

2007-04-25 Thread Fengguang Wu
:15MB/s 140KB Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c | 11 +++-- mm/readahead.c | 101 +-- 2 files changed, 105 insertions(+), 7 deletions(-) --- linux-2.6.21-rc7-mm1.orig/mm/readahead.c +++ linux-2.6.21-rc7

[PATCH 09/14] readahead: remove parameter ra_max from adjust_rala*()

2007-03-16 Thread Fengguang Wu
Remove the unused parameter @ra_max from adjust_rala() and adjust_rala_aggressive(). Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2

[PATCH 08/14] readahead: remove parameter ra_max from thrashing_recovery_readahead()

2007-03-16 Thread Fengguang Wu
Remove the unused @ra_max from thrashing_recovery_readahead(). Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2/mm/readahead.c @@ -1567,9

[PATCH 02/14] readahead: state based method: decouple readahead_ratio from growth_limit

2007-03-16 Thread Fengguang Wu
, and expect the kernel to do large I/Os right away. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2/mm/readahead.c @@ -1099,7 +1099,7 @@ state_based_readahead

[PATCH 06/14] readahead: call scheme: cleanup

2007-03-16 Thread Fengguang Wu
Merge two similar page_cache_readahead_adaptive() calls into one. No behavior change. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/filemap.c +++ linux-2.6.21-rc3-mm2

[PATCH 10/14] readahead: state based method: protect against tiny size

2007-03-16 Thread Fengguang Wu
Move the tiny I/O size protection code from limit_rala() to state_based_readahead(). limit_rala() is also called by context based readahead, which has its own minimal readahead size. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 14 +++--- 1 file changed, 7

[PATCH 00/14] Adaptive readahead update

2007-03-16 Thread Fengguang Wu
are: - convert to Martin's statistic infrastructure - a replacement of the stock readahead to be simple, reliable and fast Regards, Fengguang Wu --- Recommended patch ordering: --- broken-out/series 2007-03-08 11:45:54.0 +0800 +++ patches/series

[PATCH 01/14] readahead: state based method: check node id

2007-03-16 Thread Fengguang Wu
The file_ra_state.age is node specific, comparing ages between two nodes is a bug. So add code to - take down the node id in file_ra_state.flags; - ensure that we are comparing the ages from the same node. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- include/linux/fs.h |2 +- mm

[PATCH 12/14] readahead: account I/O block times for stock readahead

2007-03-16 Thread Fengguang Wu
Account I/O block times for the stock readahead, too. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2/mm/readahead.c @@ -1756,15 +1756,15

[PATCH 14/14] readahead: remove noaction/shrink events

2007-03-16 Thread Fengguang Wu
Tear down the following ra_account(NULL, ...) calls: ra_account(RA_EVENT_LOOKAHEAD_NOACTION) ra_account(RA_EVENT_READAHEAD_SHRINK) The two events are not as useful and do not have clear meanings. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 20

[PATCH 11/14] readahead: rename state_based_readahead() to clock_based_readahead()

2007-03-16 Thread Fengguang Wu
Rename state_based_readahead() to clock_based_readahead(). It better reflects the property of that readahead method. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm

[PATCH 03/14] readahead: state based method: cancel lookahead gracefully

2007-03-16 Thread Fengguang Wu
When canceling lookahead, update ra-lookahead_index to the next invoke index. So that we see a consistent state in the next time. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm

[PATCH 04/14] readahead: thrashing recovery method: check unbalanced aging

2007-03-16 Thread Fengguang Wu
of probe_page() is not a concern. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2/mm/readahead.c @@ -1546,14 +1546,11 @@ thrashing_recovery_readahead

[PATCH 05/14] readahead: thrashing recovery method: refill holes

2007-03-16 Thread Fengguang Wu
) case where we get the exact thrashing threshold: 3) the new chunk is thrashed. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3

[PATCH 13/14] readahead: rescue_pages() updates

2007-03-16 Thread Fengguang Wu
() on each page. It's harmful to have any lookahead marks when thrashing is pending. - Add a call to rescue_pages() in thrashing_recovery_readahead(). Stress tested in qemu. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 67 +++ 1

[PATCH 07/14] readahead: call scheme: catch thrashing on lookahead time

2007-03-16 Thread Fengguang Wu
(). Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) --- linux-2.6.21-rc3-mm2.orig/mm/readahead.c +++ linux-2.6.21-rc3-mm2/mm/readahead.c @@ -1638,6 +1638,13 @@ page_cache_readahead_adaptive(struct add

Re: Doc for your Adaptive ReadAhead patch

2007-04-11 Thread Fengguang Wu
On Wed, Apr 11, 2007 at 04:44:34AM +, Jin Steve wrote: Just like the function check_ra_success: (Does it mean: last time RAVM_MAX_CACHE_HIT, so next time no need readahead?) The cache hit logic is to prevent doing pointless readahead for an already cached file: the pages are already there.

Re: [-mm3 patch]Warning fix: check the return value of kobject_add etc.

2007-04-11 Thread Fengguang Wu
On Sun, Apr 01, 2007 at 02:20:46PM +0800, Cong WANG wrote: 2007/4/1, Andrew Morton [EMAIL PROTECTED]: Also, please always prepare patches in `patch -p1' form, as per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt, thanks. Sorry. I am confused with this. Does that mean I should

Re: [PATCH -mm] readahead: partial sendfile fix

2007-03-08 Thread Fengguang Wu
Ram Pai, Sorry for the long delay, I was just back from the winter vacation. On Mon, Feb 12, 2007 at 11:49:10AM -0800, Ram Pai wrote: The solution you proposed seems kludgy to me. If you determine that the I dislike it, either. its a restarted aio, then start reading from where readahead had

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-08 Thread Fengguang Wu
On Mon, Jan 07, 2008 at 02:40:13PM +0100, Joerg Platte wrote: Am Montag, 7. Januar 2008 schrieb Peter Zijlstra: On Mon, 2008-01-07 at 14:24 +0100, Joerg Platte wrote: This is from: 2.6.24-rc7 kernel: pdflush D f41c2f14 0 18822 2 kernel:f673f000 0046

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-09 Thread Fengguang Wu
On Wed, Jan 09, 2008 at 07:13:14AM +0100, Joerg Platte wrote: Am Mittwoch, 9. Januar 2008 schrieb Fengguang Wu: /dev/sda6 on / type ext3 (rw,noatime,errors=remount-ro,acl) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-09 Thread Fengguang Wu
On Wed, Jan 09, 2008 at 01:22:33PM +0100, Joerg Platte wrote: Am Mittwoch, 9. Januar 2008 schrieb Fengguang Wu: Thank your for the hint with the filesystems! Thank you for the clue. However I cannot reproduce the bug on ext2/2.6.24-rc7. Can you provide more details? Thank you. I

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-09 Thread Fengguang Wu
On Wed, Jan 09, 2008 at 02:04:29PM +0100, Joerg Platte wrote: Am Mittwoch, 9. Januar 2008 schrieb Fengguang Wu: On Wed, Jan 09, 2008 at 01:22:33PM +0100, Joerg Platte wrote: Am Mittwoch, 9. Januar 2008 schrieb Fengguang Wu: Thank your for the hint with the filesystems! Thank you

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-09 Thread Fengguang Wu
PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) --- linux-2.6.24-git17.orig/fs/fs-writeback.c +++ linux-2.6.24-git17/fs/fs-writeback.c @@ -164,12 +164,26 @@ static void redirty_tail(struct inode *i

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-09 Thread Fengguang Wu
On Thu, Jan 10, 2008 at 03:30:46PM +0800, Fengguang Wu wrote: Joerg, Can you try the attached patches? Thank you. I cannot reliably reproduce the bug yet. Please ignore the first patch and only apply the two debugging patches. They will produce many printk messages. The output of `dmesg

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-10 Thread Fengguang Wu
On Thu, Jan 10, 2008 at 09:37:53AM +0100, Joerg Platte wrote: Am Donnerstag, 10. Januar 2008 schrieb Fengguang Wu: On Thu, Jan 10, 2008 at 03:30:46PM +0800, Fengguang Wu wrote: Joerg, Can you try the attached patches? Thank you. I cannot reliably reproduce the bug yet. Please

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-10 Thread Fengguang Wu
On Thu, Jan 10, 2008 at 11:03:05AM +0100, Joerg Platte wrote: Am Donnerstag, 10. Januar 2008 schrieb Fengguang Wu: problem, because the iowait problem disappeared today after the regular Debian update. I'll try to install the old package versions to make it show up again. Maybe

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-12 Thread Fengguang Wu
On Sun, Jan 13, 2008 at 12:32:30AM +0100, Joerg Platte wrote: Am Freitag, 11. Januar 2008 schrieb Fengguang Wu: On Thu, Jan 10, 2008 at 11:03:05AM +0100, Joerg Platte wrote: Am Donnerstag, 10. Januar 2008 schrieb Fengguang Wu: problem, because the iowait problem disappeared today after

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-13 Thread Fengguang Wu
On Sun, Jan 13, 2008 at 09:05:43AM +0100, Joerg Platte wrote: Am Sonntag, 13. Januar 2008 schrieb Fengguang Wu: No idea yet :-/ I'm afraid I have to trouble you again - the bug just refused to appear in my system. I prepared a kernel module for you to gather more information: make

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-13 Thread Fengguang Wu
On Sun, Jan 13, 2008 at 10:49:31AM +0100, Joerg Platte wrote: register_jprobe(ext2_writepage) = 0 register_jprobe(requeue_io) = 0 register_kprobe(submit_bio) = 0 requeue_io: inode 114019(sda7/.kde) count 2,2 size 0 pages 1 0 2 0 U requeue_io: inode

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-13 Thread Fengguang Wu
On Sun, Jan 13, 2008 at 07:59:33PM +0800, Fengguang Wu wrote: On Sun, Jan 13, 2008 at 10:49:31AM +0100, Joerg Platte wrote: register_jprobe(ext2_writepage) = 0 register_jprobe(requeue_io) = 0 register_kprobe(submit_bio) = 0 requeue_io: inode 114019(sda7/.kde) count 2,2 size 0 pages 1

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-14 Thread Fengguang Wu
On Mon, Jan 14, 2008 at 11:54:39AM +0800, Fengguang Wu wrote: particular this bug is triggered because the dir mapping page has PAGECACHE_TAG_DIRTY set and PG_dirty cleared, staying in an inconsistent state. Just found that a deleted dir will enter that inconsistent state when someone

Re: regression: 100% io-wait with 2.6.24-rcX

2008-01-14 Thread Fengguang Wu
On Mon, Jan 14, 2008 at 12:41:26PM +0100, Peter Zijlstra wrote: On Mon, 2008-01-14 at 12:30 +0100, Joerg Platte wrote: Am Montag, 14. Januar 2008 schrieb Fengguang Wu: Joerg, this patch fixed the bug for me :-) Fengguang, congratulations, I can confirm that your patch fixed the bug

Re: [PATCH 0/9] mmap read-around and readahead

2007-12-18 Thread Fengguang Wu
On Sun, Dec 16, 2007 at 03:35:58PM -0800, Linus Torvalds wrote: On Sun, 16 Dec 2007, Fengguang Wu wrote: Here are the mmap read-around related patches initiated by Linus. They are for linux-2.6.24-rc4-mm1. The one major new feature - auto detection and early readahead for mmap

Re: [PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead

2007-12-18 Thread Fengguang Wu
On Tue, Dec 18, 2007 at 09:19:07AM +0100, Nick Piggin wrote: On Sun, Dec 16, 2007 at 07:59:30PM +0800, Fengguang Wu wrote: + read_lock_irq(mapping-tree_lock); + page = radix_tree_lookup(mapping-page_tree, offset); + if (likely(page)) { + int got_lock, uptodate

Re: [PATCH 0/9] mmap read-around and readahead

2007-12-18 Thread Fengguang Wu
On Tue, Dec 18, 2007 at 07:46:09PM +0800, Fengguang Wu wrote: No timings for now... but I wrote a debug patch(attached) and watched it running for about a week. Here are some interesting numbers: Here are the (forgotten) readahead-debug.patch: --- include/linux/fs.h | 43

Re: [PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead

2007-12-18 Thread Fengguang Wu
On Wed, Dec 19, 2007 at 12:54:23AM +0100, Nick Piggin wrote: On Tue, Dec 18, 2007 at 07:50:33PM +0800, Fengguang Wu wrote: On Tue, Dec 18, 2007 at 09:19:07AM +0100, Nick Piggin wrote: On Sun, Dec 16, 2007 at 07:59:30PM +0800, Fengguang Wu wrote: + read_lock_irq(mapping-tree_lock

Re: [PATCH 0/9] mmap read-around and readahead

2007-12-18 Thread Fengguang Wu
On Sun, Dec 16, 2007 at 03:35:58PM -0800, Linus Torvalds wrote: On Sun, 16 Dec 2007, Fengguang Wu wrote: Here are the mmap read-around related patches initiated by Linus. They are for linux-2.6.24-rc4-mm1. The one major new feature - auto detection and early readahead for mmap

[PATCH 5/9] readahead: make ra_submit() non-static

2007-12-21 Thread Fengguang Wu
Make ra_submit() non-static and callable from other files. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- --- include/linux/mm.h |3 +++ mm/readahead.c |2 +- 2 files changed, 4 insertions(+), 1 deletion(-) --- linux-2.6.24-rc5-mm1.orig/include/linux/mm.h +++ linux-2.6.24-rc5-mm1

[PATCH 8/9] readahead: move max_sane_readahead() calls into force_page_cache_readahead()

2007-12-21 Thread Fengguang Wu
Simplify code by moving max_sane_readahead() calls into force_page_cache_readahead(). Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/fadvise.c |2 +- mm/filemap.c |3 +-- mm/madvise.c |3 +-- mm/readahead.c |1 + 4 files changed, 4 insertions(+), 5 deletions

[PATCH 7/9] readahead: remove unused do_page_cache_readahead()

2007-12-21 Thread Fengguang Wu
of executables. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- include/linux/mm.h |2 -- mm/readahead.c | 16 2 files changed, 18 deletions(-) --- linux-2.6.24-rc5-mm1.orig/include/linux/mm.h +++ linux-2.6.24-rc5-mm1/include/linux/mm.h @@ -1084,8 +1084,6 @@ int write_one_page

[PATCH 9/9] readahead: call max_sane_readahead() in ondemand_readahead()

2007-12-21 Thread Fengguang Wu
Apply the max_sane_readahead() limit in ondemand_readahead(). Just in case someone aggressively set a huge readahead size. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-2.6.24-rc5-mm1.orig/mm/readahead.c

[PATCH 1/9] readahead: simplify readahead call scheme

2007-12-21 Thread Fengguang Wu
)) page_cache_async_readahead(...); Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |8 1 file changed, 8 insertions(+) --- linux-2.6.24-rc5-mm1.orig/mm/readahead.c +++ linux-2.6.24-rc5-mm1/mm/readahead.c @@ -402,6 +402,14

[PATCH 4/9] readahead: quick startup on sequential mmap readahead

2007-12-21 Thread Fengguang Wu
to the full readahead size anyway. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.24-rc5-mm1.orig/mm/filemap.c +++ linux-2.6.24-rc5-mm1/mm/filemap.c @@ -1320,7 +1320,7 @@ static void do_sync_mmap_readahead(struc

[PATCH 3/9] readahead: auto detection of sequential mmap reads

2007-12-21 Thread Fengguang Wu
size is 64KB and (1-2)'s real I/O size is 128KB, since the half of the read-around pages will be cache hits. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- --- mm/filemap.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) --- linux-2.6.24-rc5-mm1.orig/mm/filemap.c +++ linux-2.6.24

[PATCH 0/9] mmap read-around and readahead take 2

2007-12-21 Thread Fengguang Wu
Andrew, Here are the mmap read-around related patches initiated by Linus. They are for linux-2.6.24-rc5-mm1. They're mainly about code cleanups. The only major new feature - auto detection and early readahead for mmap sequential reads - shows about 2% speedup on single stream case, and should

[PATCH 6/9] readahead: save mmap read-around states in file_ra_state

2007-12-21 Thread Fengguang Wu
Change mmap read-around to share the same code style and data structure with readahead code. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) --- linux-2.6.24-rc5-mm1.orig/mm/filemap.c +++ linux-2.6.24-rc5-mm1/mm

[PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead

2007-12-21 Thread Fengguang Wu
inside some subtle loop and thus avoiding the now unnecessary extra state variables (ie did_readaround is gone). Cc: Nick Piggin [EMAIL PROTECTED] Cc: Andrew Morton [EMAIL PROTECTED] Cc: Fengguang Wu [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] --- Ok, so this is something I

Re: [patch 1/1] Writeback fix for concurrent large and small file writes

2007-11-29 Thread Fengguang Wu
On Thu, Nov 29, 2007 at 12:16:36PM -0800, Michael Rubin wrote: Due to my faux pas of top posting (see http://www.zip.com.au/~akpm/linux/patches/stuff/top-posting.txt) I am resending this email. On Nov 28, 2007 4:34 PM, Fengguang Wu [EMAIL PROTECTED] wrote: Could you demonstrate

[PATCH BUGFIX] hid: the `bit' in hidinput_mapping_quirks() is an out parameter

2007-12-07 Thread Fengguang Wu
Fix a panic, by changing hidinput_mapping_quirks(,, unsigned long *bit,) to hidinput_mapping_quirks(,, unsigned long **bit,) The `bit' in this function is an out parameter. Cc: Jiri Kosina [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- drivers/hid/hid

Re: [patch 1/1] Writeback fix for concurrent large and small file writes

2007-11-28 Thread Fengguang Wu
On Wed, Nov 28, 2007 at 11:29:57AM -0800, Michael Rubin wrote: From [EMAIL PROTECTED] Wed Nov 28 11:10:06 2007 Message-Id: [EMAIL PROTECTED] Date: Wed, 28 Nov 2007 11:01:21 -0800 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [patch 1/1] Writeback fix for concurrent large and small

[PATCH 3/9] readahead: auto detection of sequential mmap reads

2007-12-16 Thread Fengguang Wu
to require valid readahead state for async readahead, which means we don't do readahead for interleaved reads for now, but let's make it safe for this initial try. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- --- mm/filemap.c |6 -- 1 file changed, 4 insertions(+), 2 deletions

[PATCH 0/9] mmap read-around and readahead

2007-12-16 Thread Fengguang Wu
Andrew, Here are the mmap read-around related patches initiated by Linus. They are for linux-2.6.24-rc4-mm1. The one major new feature - auto detection and early readahead for mmap sequential reads - runs as expected on my desktop :-) [PATCH 1/9] readahead: simplify readahead call scheme

[PATCH 9/9] readahead: call max_sane_readahead() in ondemand_readahead()

2007-12-16 Thread Fengguang Wu
Apply the max_sane_readahead() limit in ondemand_readahead(). Just in case someone aggressively set a huge readahead size. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-2.6.24-rc4-mm1.orig/mm/readahead.c

[PATCH 5/9] readahead: make ra_submit() non-static

2007-12-16 Thread Fengguang Wu
Make ra_submit() non-static and callable from other files. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- --- include/linux/mm.h |3 +++ mm/readahead.c |2 +- 2 files changed, 4 insertions(+), 1 deletion(-) --- linux-2.6.24-rc4-mm1.orig/include/linux/mm.h +++ linux-2.6.24-rc4-mm1

[PATCH 7/9] readahead: remove unused do_page_cache_readahead()

2007-12-16 Thread Fengguang Wu
of executables. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- include/linux/mm.h |2 -- mm/readahead.c | 16 2 files changed, 18 deletions(-) --- linux-2.6.24-rc4-mm1.orig/include/linux/mm.h +++ linux-2.6.24-rc4-mm1/include/linux/mm.h @@ -1084,8 +1084,6 @@ int write_one_page

[PATCH 4/9] readahead: quick startup on sequential mmap readahead

2007-12-16 Thread Fengguang Wu
to the full readahead size anyway. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.24-rc4-mm1.orig/mm/filemap.c +++ linux-2.6.24-rc4-mm1/mm/filemap.c @@ -1320,7 +1320,7 @@ static void do_sync_mmap_readahead(struc

[PATCH 1/9] readahead: simplify readahead call scheme

2007-12-16 Thread Fengguang Wu
)) page_cache_async_readahead(...); Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/readahead.c |8 1 file changed, 8 insertions(+) --- linux-2.6.24-rc4-mm1.orig/mm/readahead.c +++ linux-2.6.24-rc4-mm1/mm/readahead.c @@ -402,6 +402,14

[PATCH 6/9] readahead: save mmap read-around states in file_ra_state

2007-12-16 Thread Fengguang Wu
Change mmap read-around to share the same code style and data structure with readahead code. Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/filemap.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) --- linux-2.6.24-rc4-mm1.orig/mm/filemap.c +++ linux-2.6.24-rc4-mm1

[PATCH 8/9] readahead: move max_sane_readahead() calls into force_page_cache_readahead()

2007-12-16 Thread Fengguang Wu
Simplify code by moving max_sane_readahead() calls into force_page_cache_readahead(). Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- mm/fadvise.c |2 +- mm/filemap.c |3 +-- mm/madvise.c |3 +-- mm/readahead.c |1 + 4 files changed, 4 insertions(+), 5 deletions

[PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead

2007-12-16 Thread Fengguang Wu
inside some subtle loop and thus avoiding the now unnecessary extra state variables (ie did_readaround is gone). Cc: Nick Piggin [EMAIL PROTECTED] Cc: Andrew Morton [EMAIL PROTECTED] Cc: Fengguang Wu [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] --- Ok, so this is something I

Re: read-ahead in NFS server

2007-12-27 Thread Fengguang Wu
On Thu, Dec 27, 2007 at 05:00:12PM +0200, saeed bishara wrote: Are you using TCP? Are you using NFSv4, or an older version? I'm using NFSv3/UDP. IMO, you definitely want TCP and NFSv4. Much better network behavior, with some of the silly UDP limits (plus greatly improved caching

Re: [patch 1/1] Writeback fix for concurrent large and small file writes.

2007-12-27 Thread Fengguang Wu
Hi Michael, // sorry for the delay... On Mon, Dec 10, 2007 at 06:02:55PM -0800, Michael Rubin wrote: From: Michael Rubin [EMAIL PROTECTED] Fixing a bug where writing to large files while concurrently writing to smaller ones creates a situation where writeback cannot keep up with the

[PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages

2007-12-28 Thread Fengguang Wu
. When such no-write page goes to metapage_writepage(), the `relic' PAGECACHE_TAG_DIRTY tag should be cleared, to prevent pdflush from repeatedly trying to sync them. Also, avoid the redirty when a bio submission is planned. Tested-by: Markus Rehbach [EMAIL PROTECTED] Signed-off-by: Fengguang Wu

Re: [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages

2007-12-28 Thread Fengguang Wu
On Fri, Dec 28, 2007 at 12:33:46PM +0100, Peter Zijlstra wrote: On Fri, 2007-12-28 at 16:03 +0800, Fengguang Wu wrote: Andrew, This patch fixed the 'pdflush stuck in D state' bug http://bugzilla.kernel.org/show_bug.cgi?id=9291 and should be pushed to mainline ASAP

[PATCH 06/11] writeback: requeue_io_wait() on locked buffers

2007-12-28 Thread Fengguang Wu
Convert to requeue_io_wait() for case: pages skipped due to locked buffers Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux

[PATCH 05/11] writeback: requeue_io_wait() on congested blockdev

2007-12-28 Thread Fengguang Wu
Convert to requeue_io_wait() for case: congested blockdev Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.24-rc6-mm1.orig

[PATCH 04/11] writeback: requeue_io_wait() on locked inode

2007-12-28 Thread Fengguang Wu
Convert to requeue_io_wait() for case: inode is locked Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) --- linux-2.6.24-rc6-mm1

[PATCH 10/11] writeback: remove redirty_tail()

2007-12-28 Thread Fengguang Wu
Remove redirty_tail(). It's no longer used. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 24 1 file changed, 24 deletions(-) --- linux-2.6.24-rc6-mm1.orig/fs/fs

[PATCH 00/11] writeback bug fixes and simplifications

2007-12-28 Thread Fengguang Wu
Andrew, Here are some writeback bug fixes and code cleanups, based on 2.6.24-rc6-mm1. The detailed description can be found in the first patch, which introduces the new facility for the following patches to use. The first two patches combined should fix the slow writes for concurrent large and

[PATCH 07/11] writeback: requeue_io() on redirtied inode

2007-12-28 Thread Fengguang Wu
-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.24-rc6-mm1.orig/fs/fs-writeback.c +++ linux-2.6.24-rc6-mm1/fs/fs-writeback.c @@ -287,11 +287,11 @@ __sync_single_inode(struct inode *inode, } else if (inode-i_state

[PATCH 01/11] writeback: introduce s_more_io_wait for inodes to be re-synced after a while

2007-12-28 Thread Fengguang Wu
, the dirty inode will stay in s_*io* queues until made clean - the dirty inodes in s_*io* queues will be revisted in order: no starvation Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 22

[PATCH 09/11] writeback: replace redirty_tail() on memory-backed bdi

2007-12-28 Thread Fengguang Wu
Replace redirty_tail() with queue_dirty() on memory backed bdi. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.24-rc6-mm1.orig/fs

[PATCH 03/11] writeback: replace redirty_tail() on more-pages-to-sync

2007-12-28 Thread Fengguang Wu
Replace redirty_tail() with requeue_io()/requeue_io_wait() when there are more pages to sync. There won't be starvation. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 43

[PATCH 02/11] writeback: requeue_io_wait() on blocked kupdate

2007-12-28 Thread Fengguang Wu
Convert to requeue_io_wait() for case: kupdate cannot write all pages because of uncontrollable bad conditions. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c |7 ++- 1 file changed, 6

[PATCH 08/11] writeback: introduce queue_dirty()

2007-12-28 Thread Fengguang Wu
Introduce queue_dirty() to enqueue a newly dirtied inode. It helps remove duplicate code. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 21 + 1 file changed, 13 insertions(+), 8

[PATCH 11/11] writeback: __sync_single_inode() code cleanup

2007-12-28 Thread Fengguang Wu
Make the if-else straight in __sync_single_inode(). No behavior change. Cc: Michael Rubin [EMAIL PROTECTED] Cc: Peter Zijlstra [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) --- linux

Re: [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages

2007-12-28 Thread Fengguang Wu
*/ Otherwise looks pretty good. Reviewed-by: Fengguang Wu [EMAIL PROTECTED] -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages

2007-12-28 Thread Fengguang Wu
On Fri, Dec 28, 2007 at 10:50:59PM -0600, Dave Kleikamp wrote: On Sat, 2007-12-29 at 10:21 +0800, Fengguang Wu wrote: On Fri, Dec 28, 2007 at 10:53:14AM -0600, Dave Kleikamp wrote: --- diff -Nurp linux-2.6.24-rc6-git5/fs/jfs/jfs_metapage.c linux/fs/jfs/jfs_metapage.c

Re: + reiserfs-dont-drop-pg_dirty-when-releasing-sub-page-sized-dirty-file .patch added to -mm tree

2007-10-24 Thread Fengguang Wu
sub-page-sized dirty file From: Fengguang Wu [EMAIL PROTECTED] This is not a new problem in 2.6.23-git17. 2.6.22/2.6.23 is buggy in the same way. Reiserfs could accumulate dirty sub-page-size files until umount time. They cannot be synced to disk by pdflush routines or explicit `sync

Re: pdflush stuck in D state with v2.6.24-rc1-192-gef49c32

2007-10-30 Thread Fengguang Wu
(WRITE, HZ/10); Subject: track redirty_tail() calls It helps a lot to know how redirty_tail() are called. Cc: Ken Chen [EMAIL PROTECTED] Cc: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/fs-writeback.c | 16 +++- 1 file changed, 15 insertions(+), 1

Re: pdflush stuck in D state with v2.6.24-rc1-192-gef49c32

2007-10-30 Thread Fengguang Wu
On Tue, Oct 30, 2007 at 06:42:50AM -0500, Florin Iucha wrote: On Tue, Oct 30, 2007 at 03:54:03PM +0800, Fengguang Wu wrote: It could be triggered by the more aggressive writeback behavior - the new code will keep on retrying as long as there are dirty inodes pending. Florin, would you

Re: pdflush stuck in D state with v2.6.24-rc1-192-gef49c32

2007-10-30 Thread Fengguang Wu
On Tue, Oct 30, 2007 at 10:52:45PM -0500, Florin Iucha wrote: On Tue, Oct 30, 2007 at 07:02:42PM -0500, Florin Iucha wrote: I have added the patches and started a linux kernel compilation, and something really interesting happens. I run the build with the equivalent of make -j3 and in a

Re: pdflush stuck in D state with v2.6.24-rc1-192-gef49c32

2007-11-01 Thread Fengguang Wu
On Wed, Oct 31, 2007 at 12:53:18PM -0500, Florin Iucha wrote: On Wed, Oct 31, 2007 at 07:16:06AM -0500, Florin Iucha wrote: On Wed, Oct 31, 2007 at 02:53:25PM +0800, Fengguang Wu wrote: On Tue, Oct 30, 2007 at 10:52:45PM -0500, Florin Iucha wrote: On Tue, Oct 30, 2007 at 07:02:42PM -0500

Re: 100% iowait on one of cpus in current -git

2007-11-01 Thread Fengguang Wu
On Wed, Oct 31, 2007 at 04:22:10PM +0100, Torsten Kaiser wrote: On 10/22/07, Fengguang Wu [EMAIL PROTECTED] wrote: On Mon, Oct 22, 2007 at 09:10:45PM +0800, Fengguang Wu wrote: Hmm, Maybe it's an reiserfs related issue. Do you have the full log file? Bingo! It can be reproduced in -mm

Re: pdflush stuck in D state with v2.6.24-rc1-192-gef49c32

2007-11-01 Thread Fengguang Wu
On Thu, Nov 01, 2007 at 07:25:58AM -0500, Florin Iucha wrote: On Thu, Nov 01, 2007 at 03:15:32PM +0800, Fengguang Wu wrote: On Wed, Oct 31, 2007 at 12:53:18PM -0500, Florin Iucha wrote: This patch does not fix anything for me. Even such light use of the reiserfs filesystem as pulling

Re: 100% iowait on one of cpus in current -git

2007-10-22 Thread Fengguang Wu
On Mon, Oct 22, 2007 at 12:40:24PM +0200, Maxim Levitsky wrote: On Monday 22 October 2007 12:22:10 Peter Zijlstra wrote: [ 673.365631] pdflush D c21bdecc 0 221 2 [ 673.365635]c21bdee0 0046 0002 c21bdecc c21bdec4 c21b3000 0002 [

Re: 100% iowait on one of cpus in current -git

2007-10-22 Thread Fengguang Wu
On Mon, Oct 22, 2007 at 12:58:11PM +0200, Maxim Levitsky wrote: On Monday 22 October 2007 12:55:25 Fengguang Wu wrote: On Mon, Oct 22, 2007 at 12:40:24PM +0200, Maxim Levitsky wrote: On Monday 22 October 2007 12:22:10 Peter Zijlstra wrote: [ 673.365631] pdflush D c21bdecc 0

Re: 100% iowait on one of cpus in current -git

2007-10-22 Thread Fengguang Wu
On Mon, Oct 22, 2007 at 02:21:21PM +0200, Maxim Levitsky wrote: I Bisected this bug to exactly this commit: 2e6883bdf49abd0e7f0d9b6297fc3be7ebb2250b writeback: introduce writeback_control.more_io to indicate more io Reverting it and compiling latest git shows no more signs of that bug.

Re: 100% iowait on one of cpus in current -git

2007-10-22 Thread Fengguang Wu
On Mon, Oct 22, 2007 at 03:05:35PM +0200, Maxim Levitsky wrote: Hi, Thank you very much too, for helping me. You are welcome :-) Applied. Had to kill klogd, since kernel generates tons of redirtied inode messages. Size of the kern.log is 863 KB, thus I I don't think it is polite to

Re: 100% iowait on one of cpus in current -git

2007-10-22 Thread Fengguang Wu
On Mon, Oct 22, 2007 at 09:10:45PM +0800, Fengguang Wu wrote: Hmm, Maybe it's an reiserfs related issue. Do you have the full log file? Bingo! It can be reproduced in -mm on reiserfs: # mkfs.reiserfs /dev/sdb1 # mount /dev/sdb1 /test # cp bin /test wait for a while # dmesg [...] [ 418.346113

[PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file

2007-10-23 Thread Fengguang Wu
-by: Fengguang Wu [EMAIL PROTECTED] --- fs/reiserfs/stree.c |3 --- 1 file changed, 3 deletions(-) --- linux-2.6.24-git17.orig/fs/reiserfs/stree.c +++ linux-2.6.24-git17/fs/reiserfs/stree.c @@ -1458,9 +1458,6 @@ static void unmap_buffers(struct page *p

Re: [PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file

2007-10-23 Thread Fengguang Wu
] Cc: Peter Zijlstra [EMAIL PROTECTED] Cc: Jeff Mahoney [EMAIL PROTECTED] Signed-off-by: Fengguang Wu [EMAIL PROTECTED] --- fs/reiserfs/stree.c |3 --- 1 file changed, 3 deletions(-) --- linux-2.6.24-git17.orig/fs/reiserfs/stree.c +++ linux-2.6.24-git17/fs/reiserfs/stree.c @@ -1458,9

Re: [PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file

2007-10-23 Thread Fengguang Wu
On Tue, Oct 23, 2007 at 10:10:53AM -0400, Chris Mason wrote: On Tue, 23 Oct 2007 19:56:20 +0800 Fengguang Wu [EMAIL PROTECTED] wrote: On Tue, Oct 23, 2007 at 12:07:07PM +0200, Peter Zijlstra wrote: [ adding reiserfs devs to the CC ] Thank you. This fix is kind of crude - even

Re: [PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file

2007-10-23 Thread Fengguang Wu
On Tue, Oct 23, 2007 at 12:17:51PM +0200, Maxim Levitsky wrote: --- fs/reiserfs/stree.c |3 --- 1 file changed, 3 deletions(-) --- linux-2.6.24-git17.orig/fs/reiserfs/stree.c +++ linux-2.6.24-git17/fs/reiserfs/stree.c @@ -1458,9 +1458,6 @@ static void unmap_buffers(struct page

Re: [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section

2012-10-31 Thread Fengguang Wu
On Wed, Oct 31, 2012 at 03:00:54PM +0800, Yuanhan Liu wrote: There are 2 issues with current code: 1. redefinition of 'gpio_cansleep': include/linux/gpio.h:60:19: error: redefinition of 'gpio_cansleep' include/asm-generic/gpio.h:212:19: note: previous definition of 'gpio_cansleep' was here

Re: [PATCH] thermal: solve compilation errors in rcar_thermal

2012-10-31 Thread Fengguang Wu
On Tue, Oct 30, 2012 at 08:21:09PM -0700, Kuninori Morimoto wrote: Hi Zhang, Andrew This patch is needed on latest linus/master branch. Please re-check this patch. Rui, it'd be better to send Andrew a finalized patch with your Acked-by or Signed-off-by (because you passed it on), after

[PATCH] vfio: simplify kmalloc+copy_from_user to memdup_user

2012-11-01 Thread Fengguang Wu
Generated by: coccinelle/api/memdup_user.cocci Acked-by: Julia Lawall julia.law...@lip6.fr Reported-by: Fengguang Wu fengguang...@intel.com --- drivers/vfio/pci/vfio_pci.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) --- linux.orig/drivers/vfio/pci/vfio_pci.c 2012

Re: Linux 3.6-rc6

2012-09-22 Thread Fengguang Wu
On Sat, Sep 22, 2012 at 11:57:23AM -0700, Linus Torvalds wrote: On Fri, Sep 21, 2012 at 5:59 PM, Shaun Ruffell sruff...@digium.com wrote: I posted patches [1,2,3] that resolve the issue for me. Shaohui Xie also hit the issue and posted a slightly different patch [4]. The patches are

[PATCH] edac_mc: fix messy kfree calls in the error path

2012-09-22 Thread Fengguang Wu
) in the 3.6-rc1 merge window. Fix it by freeing up resources in this order: free csrows[i]-channels[j] free csrows[i]-channels free csrows[i] free csrows CC: Mauro Carvalho Chehab mche...@redhat.com CC: Shaun Ruffell sruff...@digium.com Signed-off-by: Fengguang Wu fengguang...@intel.com

  1   2   3   4   5   6   7   8   9   10   >