Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbdITPTL (ORCPT ); Wed, 20 Sep 2017 11:19:11 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:44853 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751819AbdITPTI (ORCPT ); Wed, 20 Sep 2017 11:19:08 -0400 X-Google-Smtp-Source: AOwi7QCJInC+knYzMDI0kSkgdvcqUBKaBjJp8qfZ4yu13bU8WSu0QplhsU4QLgdG+CwlNXrbba3c7g== Subject: Re: [PATCH 3/6] page-writeback: pass in '0' for nr_pages writeback in laptop mode To: Jan Kara Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, clm@fb.com References: <1505850787-18311-1-git-send-email-axboe@kernel.dk> <1505850787-18311-4-git-send-email-axboe@kernel.dk> <20170920143505.GD11106@quack2.suse.cz> From: Jens Axboe Message-ID: Date: Wed, 20 Sep 2017 09:19:05 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170920143505.GD11106@quack2.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 29 On 09/20/2017 08:35 AM, Jan Kara wrote: > On Tue 19-09-17 13:53:04, Jens Axboe wrote: >> Laptop mode really wants to writeback the number of dirty >> pages and inodes. Instead of calculating this in the caller, >> just pass in 0 and let wakeup_flusher_threads() handle it. >> >> Use the new wakeup_flusher_threads_bdi() instead of rolling >> our own. >> >> Signed-off-by: Jens Axboe > ... >> - rcu_read_lock(); >> - list_for_each_entry_rcu(wb, &q->backing_dev_info->wb_list, bdi_node) >> - if (wb_has_dirty_io(wb)) >> - wb_start_writeback(wb, nr_pages, true, >> - WB_REASON_LAPTOP_TIMER); >> - rcu_read_unlock(); >> + wakeup_flusher_threads_bdi(q->backing_dev_info, 0, >> + WB_REASON_LAPTOP_TIMER); >> } > > So this slightly changes the semantics since previously we were doing > range_cyclic writeback and now we don't. I don't think this matters in > practice but please mention that in the changelog. With that you can add: Thanks, I added a note about that in the commit message. -- Jens Axboe