From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbdAZBmW (ORCPT ); Wed, 25 Jan 2017 20:42:22 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:44520 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbdAZBmV (ORCPT ); Wed, 25 Jan 2017 20:42:21 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 26 Jan 2017 10:42:18 +0900 From: Minchan Kim To: Johannes Weiner Cc: Andrew Morton , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 4/5] mm: vmscan: only write dirty pages that the scanner has seen twice Message-ID: <20170126014218.GD21211@bbox> References: <20170123181641.23938-1-hannes@cmpxchg.org> <20170123181641.23938-5-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170123181641.23938-5-hannes@cmpxchg.org> 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 Mon, Jan 23, 2017 at 01:16:40PM -0500, Johannes Weiner wrote: > Dirty pages can easily reach the end of the LRU while there are still > clean pages to reclaim around. Don't let kswapd write them back just > because there are a lot of them. It costs more CPU to find the clean > pages, but that's almost certainly better than to disrupt writeback > from the flushers with LRU-order single-page writes from reclaim. And > the flushers have been woken up by that point, so we spend IO capacity > on flushing and CPU capacity on finding the clean cache. > > Only start writing dirty pages if they have cycled around the LRU > twice now and STILL haven't been queued on the IO device. It's > possible that the dirty pages are so sparsely distributed across > different bdis, inodes, memory cgroups, that the flushers take forever > to get to the ones we want reclaimed. Once we see them twice on the > LRU, we know that's the quicker way to find them, so do LRU writeback. > > Signed-off-by: Johannes Weiner Acked-by: Minchan Kim