From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Raghavendra D Prabhu <rprabhu@wnohang.net>
Cc: linux-mm@kvack.org, Jens Axboe <jaxboe@fusionio.com>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Add check for dirty_writeback_interval in bdi_wakeup_thread_delayed
Date: Mon, 18 Apr 2011 10:19:12 +0300 [thread overview]
Message-ID: <1303111152.2815.29.camel@localhost> (raw)
In-Reply-To: <20110417162308.GA1208@Xye>
On Sun, 2011-04-17 at 21:53 +0530, Raghavendra D Prabhu wrote:
> In the function bdi_wakeup_thread_delayed, no checks are performed on
> dirty_writeback_interval unlike other places and timeout is being set to
> zero as result, thus defeating the purpose. So, I have changed it to be
> passed default value of interval which is 500 centiseconds, when it is
> set to zero.
> I have also verified this and tested it.
>
> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
If dirty_writeback_interval then the periodic write-back has to be
disabled. Which means we should rather do something like this:
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 0d9a036..f38722c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -334,10 +334,12 @@ static void wakeup_timer_fn(unsigned long data)
*/
void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
{
- unsigned long timeout;
+ if (dirty_writeback_interval) {
+ unsigned long timeout;
- timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
- mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
+ timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+ mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
+ }
}
I do not see why you use 500 centisecs instead - I think this is wrong.
> ---
> mm/backing-dev.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index befc875..d06533c 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -336,7 +336,10 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
> {
> unsigned long timeout;
>
> - timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
> + if (dirty_writeback_interval)
> + timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
> + else
> + timeout = msecs_to_jiffies(5000);
> mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
> }
>
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Raghavendra D Prabhu <rprabhu@wnohang.net>
Cc: linux-mm@kvack.org, Jens Axboe <jaxboe@fusionio.com>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Add check for dirty_writeback_interval in bdi_wakeup_thread_delayed
Date: Mon, 18 Apr 2011 10:19:12 +0300 [thread overview]
Message-ID: <1303111152.2815.29.camel@localhost> (raw)
In-Reply-To: <20110417162308.GA1208@Xye>
On Sun, 2011-04-17 at 21:53 +0530, Raghavendra D Prabhu wrote:
> In the function bdi_wakeup_thread_delayed, no checks are performed on
> dirty_writeback_interval unlike other places and timeout is being set to
> zero as result, thus defeating the purpose. So, I have changed it to be
> passed default value of interval which is 500 centiseconds, when it is
> set to zero.
> I have also verified this and tested it.
>
> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
If dirty_writeback_interval then the periodic write-back has to be
disabled. Which means we should rather do something like this:
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 0d9a036..f38722c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -334,10 +334,12 @@ static void wakeup_timer_fn(unsigned long data)
*/
void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
{
- unsigned long timeout;
+ if (dirty_writeback_interval) {
+ unsigned long timeout;
- timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
- mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
+ timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+ mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
+ }
}
I do not see why you use 500 centisecs instead - I think this is wrong.
> ---
> mm/backing-dev.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index befc875..d06533c 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -336,7 +336,10 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
> {
> unsigned long timeout;
>
> - timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
> + if (dirty_writeback_interval)
> + timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
> + else
> + timeout = msecs_to_jiffies(5000);
> mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
> }
>
--
Best Regards,
Artem Bityutskiy (D?N?N?N?D 1/4 D?D,N?N?N?DoD,D1)
--
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>
next prev parent reply other threads:[~2011-04-18 7:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-17 16:23 [PATCH 1/1] Add check for dirty_writeback_interval in bdi_wakeup_thread_delayed Raghavendra D Prabhu
2011-04-17 16:23 ` Raghavendra D Prabhu
2011-04-18 0:02 ` Dave Chinner
2011-04-18 0:02 ` Dave Chinner
2011-04-18 7:08 ` [TOME] " Raghavendra D Prabhu
2011-04-18 7:19 ` Artem Bityutskiy [this message]
2011-04-18 7:19 ` Artem Bityutskiy
2011-04-18 9:16 ` Raghavendra D Prabhu
2011-04-18 12:26 ` Artem Bityutskiy
2011-04-18 12:26 ` Artem Bityutskiy
2011-04-20 19:17 ` Raghavendra D Prabhu
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=1303111152.2815.29.camel@localhost \
--to=artem.bityutskiy@nokia.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rprabhu@wnohang.net \
/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.