lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20171014175906.GA1825@zrhn9910b>
Date:   Sat, 14 Oct 2017 19:59:06 +0200
From:   Damian Tometzki <damian.tometzki@...oud.com>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     axboe@...nel.dk, akpm@...ux-foundation.org, jack@...e.cz,
        hannes@...xchg.org, vdavydov.dev@...il.com, jlayton@...hat.com,
        nborisov@...e.com, tytso@....edu, yamada.masahiro@...ionext.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH for linux-next] mm/page-writeback.c: make changes of
 dirty_writeback_centisecs take effect immediately

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 <axboe@...nel.dk>
> Cc: Jan Kara <jack@...e.cz>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Yafang Shao <laoar.shao@...il.com>
> ---
>  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@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ