From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751469AbdJDH0j (ORCPT ); Wed, 4 Oct 2017 03:26:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:50512 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751047AbdJDH0i (ORCPT ); Wed, 4 Oct 2017 03:26:38 -0400 Date: Wed, 4 Oct 2017 09:26:35 +0200 From: Jan Kara To: Jens Axboe Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hannes@cmpxchg.org, jack@suse.cz Subject: Re: [PATCH 1/2] writeback: eliminate work item allocation in bd_start_writeback() Message-ID: <20171004072635.GP11879@quack2.suse.cz> References: <1507043781-2874-1-git-send-email-axboe@kernel.dk> <1507043781-2874-2-git-send-email-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507043781-2874-2-git-send-email-axboe@kernel.dk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 03-10-17 09:16:20, Jens Axboe wrote: > Handle start-all writeback like we do periodic or kupdate > style writeback - by marking the bdi_writeback as needing a full > flush, and simply waking the thread. This eliminates the need to > allocate and queue a specific work item just for this purpose. > > After this change, we truly only ever have one of them running at > any point in time. We mark the need to start all flushes, and the > writeback thread will clear it once it has processed the request. > > Signed-off-by: Jens Axboe Just one nit below. You can add: Reviewed-by: Jan Kara > diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h > index 420de5c7c7f9..f0f1df29d6b8 100644 > --- a/include/linux/backing-dev-defs.h > +++ b/include/linux/backing-dev-defs.h > @@ -116,6 +116,7 @@ struct bdi_writeback { > > struct fprop_local_percpu completions; > int dirty_exceeded; > + int start_all_reason; This should be 'enum wb_reason' instead of 'int'. Honza -- Jan Kara SUSE Labs, CR