From: Andrew Morton <akpm@linux-foundation.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Linux-Next <linux-next@vger.kernel.org>,
Matthew Garrett <mjg@redhat.com>,
Jens Axboe <jens.axboe@oracle.com>
Subject: Re: linux-next: April 27 (mm/page-writeback)
Date: Tue, 27 Apr 2010 11:08:07 -0700 [thread overview]
Message-ID: <20100427110807.d8641ace.akpm@linux-foundation.org> (raw)
In-Reply-To: <8ea19b02-d4d8-4000-9842-fec7f5bcf90d@default>
On Tue, 27 Apr 2010 09:19:30 -0700 (PDT)
Randy Dunlap <randy.dunlap@oracle.com> wrote:
> When CONFIG_BLOCK is not enabled:
>
> mm/page-writeback.c:707: error: dereferencing pointer to incomplete type
> mm/page-writeback.c:708: error: dereferencing pointer to incomplete type
>
Subject: "laptop-mode: Make flushes per-device" fix
From: Andrew Morton <akpm@linux-foundation.org>
When CONFIG_BLOCK is not enabled:
mm/page-writeback.c:707: error: dereferencing pointer to incomplete type
mm/page-writeback.c:708: error: dereferencing pointer to incomplete type
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
block/blk-core.c | 15 +++++++++++++++
include/linux/writeback.h | 1 -
mm/page-writeback.c | 15 ---------------
3 files changed, 15 insertions(+), 16 deletions(-)
diff -puN block/blk-core.c~laptop-mode-make-flushes-per-device-fix block/blk-core.c
--- a/block/blk-core.c~laptop-mode-make-flushes-per-device-fix
+++ a/block/blk-core.c
@@ -488,6 +488,21 @@ struct request_queue *blk_alloc_queue(gf
}
EXPORT_SYMBOL(blk_alloc_queue);
+static void laptop_mode_timer_fn(unsigned long data)
+{
+ struct request_queue *q = (struct request_queue *)data;
+ int nr_pages = global_page_state(NR_FILE_DIRTY) +
+ global_page_state(NR_UNSTABLE_NFS);
+
+ /*
+ * We want to write everything out, not just down to the dirty
+ * threshold
+ */
+
+ if (bdi_has_dirty_io(&q->backing_dev_info))
+ bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages);
+}
+
struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
{
struct request_queue *q;
diff -puN mm/page-writeback.c~laptop-mode-make-flushes-per-device-fix mm/page-writeback.c
--- a/mm/page-writeback.c~laptop-mode-make-flushes-per-device-fix
+++ a/mm/page-writeback.c
@@ -693,21 +693,6 @@ int dirty_writeback_centisecs_handler(ct
return 0;
}
-void laptop_mode_timer_fn(unsigned long data)
-{
- struct request_queue *q = (struct request_queue *)data;
- int nr_pages = global_page_state(NR_FILE_DIRTY) +
- global_page_state(NR_UNSTABLE_NFS);
-
- /*
- * We want to write everything out, not just down to the dirty
- * threshold
- */
-
- if (bdi_has_dirty_io(&q->backing_dev_info))
- bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages);
-}
-
/*
* We've spun up the disk and we're in laptop mode: schedule writeback
* of all dirty data a few seconds from now. If the flush is already scheduled
diff -puN include/linux/writeback.h~laptop-mode-make-flushes-per-device-fix include/linux/writeback.h
--- a/include/linux/writeback.h~laptop-mode-make-flushes-per-device-fix
+++ a/include/linux/writeback.h
@@ -99,7 +99,6 @@ static inline void inode_sync_wait(struc
void laptop_io_completion(struct backing_dev_info *info);
void laptop_sync_completion(void);
void laptop_mode_sync(struct work_struct *work);
-void laptop_mode_timer_fn(unsigned long data);
void throttle_vm_writeout(gfp_t gfp_mask);
/* These are exported to sysctl. */
_
--
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:[~2010-04-27 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 16:19 linux-next: April 27 (mm/page-writeback) Randy Dunlap
2010-04-27 18:08 ` Andrew Morton [this message]
2010-04-27 18:13 ` Jens Axboe
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=20100427110807.d8641ace.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=randy.dunlap@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).