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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bbaf4763-fe98-24c9-c63b-111930ebea84@nextfour.com>
Date:   Thu, 20 Oct 2016 16:05:12 +0300
From:   Mika Penttilä <mika.penttila@...tfour.com>
To:     <zhouxianrong@...wei.com>, <linux-mm@...ck.org>
CC:     <linux-kernel@...r.kernel.org>, <akpm@...ux-foundation.org>,
        <viro@...iv.linux.org.uk>, <mingo@...hat.com>,
        <peterz@...radead.org>, <hannes@...xchg.org>,
        <mgorman@...hsingularity.net>, <vbabka@...e.cz>, <mhocko@...e.com>,
        <vdavydov.dev@...il.com>, <minchan@...nel.org>, <riel@...hat.com>,
        <zhouxiyu@...wei.com>, <zhangshiming5@...wei.com>,
        <won.ho.park@...wei.com>, <tuxiaobing@...wei.com>
Subject: Re: [PATCH] bdi flusher should not be throttled here when it fall
 into buddy slow path



On 20.10.2016 15:38, zhouxianrong@...wei.com wrote:
> From: z00281421 <z00281421@...esmail.huawei.com>
>
> The bdi flusher should be throttled only depends on 
> own bdi and is decoupled with others.
>
> separate PGDAT_WRITEBACK into PGDAT_ANON_WRITEBACK and
> PGDAT_FILE_WRITEBACK avoid scanning anon lru and it is ok 
> then throttled on file WRITEBACK.
>
> i think above may be not right.
>
> Signed-off-by: z00281421 <z00281421@...esmail.huawei.com>
> ---
>  fs/fs-writeback.c      |    8 ++++++--
>  include/linux/mmzone.h |    7 +++++--
>  mm/vmscan.c            |   20 ++++++++++++--------
>  3 files changed, 23 insertions(+), 12 deletions(-)
>
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 05713a5..ddcc70f 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -1905,10 +1905,13 @@ void wb_workfn(struct work_struct *work)
>  {
>  	struct bdi_writeback *wb = container_of(to_delayed_work(work),
>  						struct bdi_writeback, dwork);
> +	struct backing_dev_info *bdi = container_of(to_delayed_work(work),
> +						struct backing_dev_info, wb.dwork);
>  	long pages_written;
>  
>  	set_worker_desc("flush-%s", dev_name(wb->bdi->dev));
> -	current->flags |= PF_SWAPWRITE;
> +	current->flags |= (PF_SWAPWRITE | PF_LESS_THROTTLE);
> +	current->bdi = bdi;
>  
>  	if (likely(!current_is_workqueue_rescuer() ||
>  		   !test_bit(WB_registered, &wb->state))) {
> @@ -1938,7 +1941,8 @@ void wb_workfn(struct work_struct *work)
>  	else if (wb_has_dirty_io(wb) && dirty_writeback_interval)
>  		wb_wakeup_delayed(wb);
>  
> -	current->flags &= ~PF_SWAPWRITE;
> +	current->bdi = NULL;
> +	current->flags &= ~(PF_SWAPWRITE | PF_LESS_THROTTLE);
>  }
>  
>  /*
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 7f2ae99..fa602e9 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -528,8 +528,11 @@ enum pgdat_flags {
>  					 * many dirty file pages at the tail
>  					 * of the LRU.
>  					 */
> -	PGDAT_WRITEBACK,		/* reclaim scanning has recently found
> -					 * many pages under writeback
> +	PGDAT_ANON_WRITEBACK,		/* reclaim scanning has recently found
> +					 * many anonymous pages under writeback
> +					 */
> +	PGDAT_FILE_WRITEBACK,		/* reclaim scanning has recently found
> +					 * many file pages under writeback
>  					 */
>  	PGDAT_RECLAIM_LOCKED,		/* prevents concurrent reclaim */

Nobody seems to be clearing those bits (same was with PGDAT_WRITEBACK) ?


--Mika

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ