lkml.org 
[lkml]   [2013]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] writeback: fix delayed sync(2)
Hello,

On Fri, Sep 20, 2013 at 04:52:26PM +0400, Maxim Patlasov wrote:
> @@ -294,7 +294,7 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
> unsigned long timeout;
>
> timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
> - mod_delayed_work(bdi_wq, &bdi->wb.dwork, timeout);
> + queue_delayed_work(bdi_wq, &bdi->wb.dwork, timeout);

Hmmm... this at least requires comment explaining why
mod_delayed_work() doesn't work here. Also, I wonder whether what we
need is a function which either queues if !pending and shortens timer
if pending. This is a relatively common pattern and the suggested fix
is subtle and fragile.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-09-21 01:21    [W:0.034 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site