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]
Date:   Mon, 9 Oct 2017 11:56:55 +0200
From:   Jan Kara <jack@...e.cz>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     akpm@...ux-foundation.org, jack@...e.cz, mhocko@...e.com,
        hannes@...xchg.org, vdavydov.dev@...il.com, jlayton@...hat.com,
        nborisov@...e.com, tytso@....edu, mawilcox@...rosoft.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page-writeback.c: fix bug caused by disable periodic
 writeback

On Sat 07-10-17 06:58:04, Yafang Shao wrote:
> After disable periodic writeback by writing 0 to
> dirty_writeback_centisecs, the handler wb_workfn() will not be
> entered again until the dirty background limit reaches or
> sync syscall is executed or no enough free memory available or
> vmscan is triggered.
> So the periodic writeback can't be enabled by writing a non-zero
> value to dirty_writeback_centisecs
> As it can be disabled by sysctl, it should be able to enable by 
> sysctl as well.
> 
> Signed-off-by: Yafang Shao <laoar.shao@...il.com>
> ---
>  mm/page-writeback.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 0b9c5cb..e202f37 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -1972,7 +1972,13 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb)
>  int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
>  	void __user *buffer, size_t *length, loff_t *ppos)
>  {
> -	proc_dointvec(table, write, buffer, length, ppos);
> +	unsigned int old_interval = dirty_writeback_interval;
> +	int ret;
> +
> +	ret = proc_dointvec(table, write, buffer, length, ppos);
> +	if (!ret && !old_interval && dirty_writeback_interval)
> +		wakeup_flusher_threads(0, WB_REASON_PERIODIC);
> +

I agree it is good to schedule some writeback. However Jens has some
changes queued in linux-block tree in this area so your change won't apply.
So please base your changes on his tree.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ