lkml.org 
[lkml]   [2017]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] buffer: cleanup free_more_memory() flusher wakeup
On Tue 19-09-17 13:53:02, Jens Axboe wrote:
> This whole function is... interesting. Change the wakeup call
> to the flusher threads to pass in nr_pages == 0, instead of
> some random number of pages. This matches more closely what
> similar cases do for memory shortage/reclaim.
>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>

Ok, probably makes sense. You can add:

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

BTW, after this nobody seems to use the number of pages for
wakeup_flusher_threads() so can you just delete the argument for the
function? After all system-wide wakeup is useful only for system wide
sync(2) or memory reclaim so number of pages isn't very useful...

Honza

> ---
> fs/buffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 170df856bdb9..9471a445e370 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -260,7 +260,7 @@ static void free_more_memory(void)
> struct zoneref *z;
> int nid;
>
> - wakeup_flusher_threads(1024, WB_REASON_FREE_MORE_MEM);
> + wakeup_flusher_threads(0, WB_REASON_FREE_MORE_MEM);
> yield();
>
> for_each_online_node(nid) {
> --
> 2.7.4
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2017-09-20 16:18    [W:0.200 / U:9.440 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site