From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751468AbdJNR7T (ORCPT ); Sat, 14 Oct 2017 13:59:19 -0400 Received: from st11p00im-asmtp004.me.com ([17.172.80.98]:49003 "EHLO st11p00im-asmtp004.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbdJNR7S (ORCPT ); Sat, 14 Oct 2017 13:59:18 -0400 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-14_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710140259 Date: Sat, 14 Oct 2017 19:59:06 +0200 From: Damian Tometzki To: Yafang Shao Cc: axboe@kernel.dk, akpm@linux-foundation.org, jack@suse.cz, hannes@cmpxchg.org, vdavydov.dev@gmail.com, jlayton@redhat.com, nborisov@suse.com, tytso@mit.edu, yamada.masahiro@socionext.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH for linux-next] mm/page-writeback.c: make changes of dirty_writeback_centisecs take effect immediately Message-id: <20171014175906.GA1825@zrhn9910b> References: <1507970307-16431-1-git-send-email-laoar.shao@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline In-reply-to: <1507970307-16431-1-git-send-email-laoar.shao@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 14. Oct 16:38, Yafang Shao wrote: > This patch is the followup of the prvious patch: > [writeback: schedule periodic writeback with sysctl]. > > There's another issue to fix. > For example, > - When the tunable was set to one hour and is reset to one second, the > new setting will not take effect for up to one hour. > > Kicking the flusher threads immediately fixes it. > > Cc: Jens Axboe > Cc: Jan Kara > Cc: Andrew Morton > Signed-off-by: Yafang Shao > --- > mm/page-writeback.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/mm/page-writeback.c b/mm/page-writeback.c > index 3969e69..768fe4e 100644 > --- a/mm/page-writeback.c > +++ b/mm/page-writeback.c > @@ -1978,7 +1978,16 @@ int dirty_writeback_centisecs_handler(struct ctl_table *table, int write, > int ret; > > ret = proc_dointvec(table, write, buffer, length, ppos); > - if (!ret && !old_interval && dirty_writeback_interval) > + > + /* > + * Writing 0 to dirty_writeback_interval will disable periodic writeback > + * and a different non-zero value will wakeup the writeback threads. > + * wb_wakeup_delayed() would be more appropriate, but it's a pain to > + * iterate over all bdis and wbs. > + * The reason we do this is to make the change take effect immediately. > + */ > + if (!ret && write && dirty_writeback_interval && > + dirty_writeback_interval != old_interval) > wakeup_flusher_threads(WB_REASON_PERIODIC); Is that call right ? The call need two arguments ? --> wakeup_flusher_threads(0,WB_REASON_PERIODIC); best regards Damian > > return ret; > -- > 1.8.3.1 > > -- > 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: email@kvack.org