From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by kanga.kvack.org (Postfix) with ESMTP id 639756B025F for ; Wed, 8 Jun 2016 04:15:54 -0400 (EDT) Received: by mail-ig0-f198.google.com with SMTP id i11so4143186igh.0 for ; Wed, 08 Jun 2016 01:15:54 -0700 (PDT) Received: from lgeamrelo13.lge.com (LGEAMRELO13.lge.com. [156.147.23.53]) by mx.google.com with ESMTP id 190si675626iof.172.2016.06.08.01.15.53 for ; Wed, 08 Jun 2016 01:15:53 -0700 (PDT) Date: Wed, 8 Jun 2016 17:15:15 +0900 From: Minchan Kim Subject: Re: [PATCH 08/10] mm: deactivations shouldn't bias the LRU balance Message-ID: <20160608081515.GD28620@bbox> References: <20160606194836.3624-1-hannes@cmpxchg.org> <20160606194836.3624-9-hannes@cmpxchg.org> MIME-Version: 1.0 In-Reply-To: <20160606194836.3624-9-hannes@cmpxchg.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Rik van Riel , Mel Gorman , Andrea Arcangeli , Andi Kleen , Michal Hocko , Tim Chen , kernel-team@fb.com On Mon, Jun 06, 2016 at 03:48:34PM -0400, Johannes Weiner wrote: > Operations like MADV_FREE, FADV_DONTNEED etc. currently move any > affected active pages to the inactive list to accelerate their reclaim > (good) but also steer page reclaim toward that LRU type, or away from > the other (bad). > > The reason why this is undesirable is that such operations are not > part of the regular page aging cycle, and rather a fluke that doesn't > say much about the remaining pages on that list. They might all be in > heavy use. But once the chunk of easy victims has been purged, the VM > continues to apply elevated pressure on the remaining hot pages. The > other LRU, meanwhile, might have easily reclaimable pages, and there > was never a need to steer away from it in the first place. > > As the previous patch outlined, we should focus on recording actually > observed cost to steer the balance rather than speculating about the > potential value of one LRU list over the other. In that spirit, leave > explicitely deactivated pages to the LRU algorithm to pick up, and let > rotations decide which list is the easiest to reclaim. > > Signed-off-by: Johannes Weiner Nice description. Agreed. Acked-by: Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161486AbcFHIQF (ORCPT ); Wed, 8 Jun 2016 04:16:05 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:55077 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932554AbcFHIPy (ORCPT ); Wed, 8 Jun 2016 04:15:54 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.150 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Wed, 8 Jun 2016 17:15:15 +0900 From: Minchan Kim To: Johannes Weiner CC: , , Andrew Morton , Rik van Riel , Mel Gorman , Andrea Arcangeli , Andi Kleen , Michal Hocko , Tim Chen , Subject: Re: [PATCH 08/10] mm: deactivations shouldn't bias the LRU balance Message-ID: <20160608081515.GD28620@bbox> References: <20160606194836.3624-1-hannes@cmpxchg.org> <20160606194836.3624-9-hannes@cmpxchg.org> MIME-Version: 1.0 In-Reply-To: <20160606194836.3624-9-hannes@cmpxchg.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/06/08 17:14:09, Serialize by Router on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/06/08 17:14:09, Serialize complete at 2016/06/08 17:14:09 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 06, 2016 at 03:48:34PM -0400, Johannes Weiner wrote: > Operations like MADV_FREE, FADV_DONTNEED etc. currently move any > affected active pages to the inactive list to accelerate their reclaim > (good) but also steer page reclaim toward that LRU type, or away from > the other (bad). > > The reason why this is undesirable is that such operations are not > part of the regular page aging cycle, and rather a fluke that doesn't > say much about the remaining pages on that list. They might all be in > heavy use. But once the chunk of easy victims has been purged, the VM > continues to apply elevated pressure on the remaining hot pages. The > other LRU, meanwhile, might have easily reclaimable pages, and there > was never a need to steer away from it in the first place. > > As the previous patch outlined, we should focus on recording actually > observed cost to steer the balance rather than speculating about the > potential value of one LRU list over the other. In that spirit, leave > explicitely deactivated pages to the LRU algorithm to pick up, and let > rotations decide which list is the easiest to reclaim. > > Signed-off-by: Johannes Weiner Nice description. Agreed. Acked-by: Minchan Kim