From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936333AbdJRIiT (ORCPT ); Wed, 18 Oct 2017 04:38:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:58132 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965258AbdJRIiQ (ORCPT ); Wed, 18 Oct 2017 04:38:16 -0400 Subject: Re: [PATCH] mm, page_alloc: simplify hot/cold page handling in rmqueue_bulk() To: Mel Gorman Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko References: <20171018073528.30982-1-vbabka@suse.cz> <20171018080631.7ebimdlwek4inits@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Wed, 18 Oct 2017 10:38:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171018080631.7ebimdlwek4inits@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 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 On 10/18/2017 10:06 AM, Mel Gorman wrote: > On Wed, Oct 18, 2017 at 09:35:28AM +0200, Vlastimil Babka wrote: >> The code for filling the pcplists in order determined by the cold flag also >> seems unnecessarily hard to follow. It's sufficient to either use list_add() >> or list_add_tail(), but the current code also updates the list head pointer >> in each step to the last added page, which then counterintuitively requires >> to switch the usage of list_add() and list_add_tail() to achieve the desired >> order, with no apparent benefit. This patch simplifies the code. >> >> Signed-off-by: Vlastimil Babka > > The "cold" treatment is dubious because almost everything that frees > considers the page "hot" which limits the usefulness of hot/cold in the > allocator. While I do not see a problem with your patch as such, please > take a look at "mm: Remove __GFP_COLD" in particular. The last 4 patches > in that series make a number of observations on how "cold" is treated in > the allocator. Ah, somehow I managed to miss that series, thanks for pointing me. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id A00CD6B0069 for ; Wed, 18 Oct 2017 04:38:16 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id l10so1835459wmg.5 for ; Wed, 18 Oct 2017 01:38:16 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id 195si7964410wmq.131.2017.10.18.01.38.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 18 Oct 2017 01:38:15 -0700 (PDT) Subject: Re: [PATCH] mm, page_alloc: simplify hot/cold page handling in rmqueue_bulk() References: <20171018073528.30982-1-vbabka@suse.cz> <20171018080631.7ebimdlwek4inits@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Wed, 18 Oct 2017 10:38:14 +0200 MIME-Version: 1.0 In-Reply-To: <20171018080631.7ebimdlwek4inits@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko On 10/18/2017 10:06 AM, Mel Gorman wrote: > On Wed, Oct 18, 2017 at 09:35:28AM +0200, Vlastimil Babka wrote: >> The code for filling the pcplists in order determined by the cold flag also >> seems unnecessarily hard to follow. It's sufficient to either use list_add() >> or list_add_tail(), but the current code also updates the list head pointer >> in each step to the last added page, which then counterintuitively requires >> to switch the usage of list_add() and list_add_tail() to achieve the desired >> order, with no apparent benefit. This patch simplifies the code. >> >> Signed-off-by: Vlastimil Babka > > The "cold" treatment is dubious because almost everything that frees > considers the page "hot" which limits the usefulness of hot/cold in the > allocator. While I do not see a problem with your patch as such, please > take a look at "mm: Remove __GFP_COLD" in particular. The last 4 patches > in that series make a number of observations on how "cold" is treated in > the allocator. Ah, somehow I managed to miss that series, thanks for pointing me. -- 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