From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757662AbcEEP5l (ORCPT ); Thu, 5 May 2016 11:57:41 -0400 Received: from mga09.intel.com ([134.134.136.24]:49097 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755051AbcEEP5k (ORCPT ); Thu, 5 May 2016 11:57:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,582,1455004800"; d="scan'208";a="969463121" Message-ID: <1462463770.22178.4.camel@linux.intel.com> Subject: Re: [PATCH 0/7] mm: Improve swap path scalability with batched operations From: Tim Chen To: Michal Hocko , Johannes Weiner Cc: Andrew Morton , Vladimir Davydov , Minchan Kim , Hugh Dickins , "Kirill A.Shutemov" , Andi Kleen , Aaron Lu , Huang Ying , linux-mm , linux-kernel@vger.kernel.org Date: Thu, 05 May 2016 08:56:10 -0700 In-Reply-To: <20160505074922.GB4386@dhcp22.suse.cz> References: <1462309239.21143.6.camel@linux.intel.com> <20160504124535.GJ29978@dhcp22.suse.cz> <1462381986.30611.28.camel@linux.intel.com> <20160504194901.GG21490@dhcp22.suse.cz> <20160504212506.GA1364@cmpxchg.org> <20160505074922.GB4386@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2 (3.18.5.2-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-05-05 at 09:49 +0200, Michal Hocko wrote: > On Wed 04-05-16 17:25:06, Johannes Weiner wrote: > > > >  > > > > > > > > > > > > > > I understand that the patch set is a little large. Any better > > > > ideas for achieving similar ends will be appreciated.  I put > > > > out these patches in the hope that it will spur solutions > > > > to improve swap. > > > > > > > > Perhaps the first two patches to make shrink_page_list into > > > > smaller components can be considered first, as a first step  > > > > to make any changes to the reclaim code easier. > > It makes sense that we need to batch swap allocation and swap cache > > operations. Unfortunately, the patches as they stand turn > > shrink_page_list() into an unreadable mess. This would need better > > refactoring before considering them for upstream merging. The swap > > allocation batching should not obfuscate the main sequence of > > events > > that is happening for both file-backed and anonymous pages. > That was my first impression as well but to be fair I only skimmed > through the patch so I might be just biased by the size. > > > > > It'd also be great if the remove_mapping() batching could be done > > universally for all pages, given that in many cases file pages from > > the same inode also cluster together on the LRU. > Agree.  I didn't try to do something on file mapped pages yet as the changes in this patch set is already quite substantial. But once we have some agreement on the batching on the anonymous pages, the file backed pages could be grouped similarly. Tim