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: <20171003122212.GK11879@quack2.suse.cz>
Date:   Tue, 3 Oct 2017 14:22:12 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        hannes@...xchg.org, jack@...e.cz, torvalds@...ux-foundation.org
Subject: Re: [PATCH 03/12] buffer: eliminate the need to call
 free_more_memory() in __getblk_slow()

On Wed 27-09-17 14:13:50, Jens Axboe wrote:
> Since the previous commit removed any case where grow_buffers()
> would return failure due to memory allocations, we can safely
> remove the case where we have to call free_more_memory() in
> this function.
> 
> Since this is also the last user of free_more_memory(), kill
> it off completely.
> 
> Signed-off-by: Jens Axboe <axboe@...nel.dk>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/buffer.c | 23 -----------------------
>  1 file changed, 23 deletions(-)
> 
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 3b60cd8456db..bff571dc7bc3 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -253,27 +253,6 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
>  }
>  
>  /*
> - * Kick the writeback threads then try to free up some ZONE_NORMAL memory.
> - */
> -static void free_more_memory(void)
> -{
> -	struct zoneref *z;
> -	int nid;
> -
> -	wakeup_flusher_threads(1024, WB_REASON_FREE_MORE_MEM);
> -	yield();
> -
> -	for_each_online_node(nid) {
> -
> -		z = first_zones_zonelist(node_zonelist(nid, GFP_NOFS),
> -						gfp_zone(GFP_NOFS), NULL);
> -		if (z->zone)
> -			try_to_free_pages(node_zonelist(nid, GFP_NOFS), 0,
> -						GFP_NOFS, NULL);
> -	}
> -}
> -
> -/*
>   * I/O completion handler for block_read_full_page() - pages
>   * which come unlocked at the end of I/O.
>   */
> @@ -1086,8 +1065,6 @@ __getblk_slow(struct block_device *bdev, sector_t block,
>  		ret = grow_buffers(bdev, block, size, gfp);
>  		if (ret < 0)
>  			return NULL;
> -		if (ret == 0)
> -			free_more_memory();
>  	}
>  }
>  
> -- 
> 2.7.4
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ