Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759838AbbLCKg7 (ORCPT ); Thu, 3 Dec 2015 05:36:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:40697 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759822AbbLCKgz (ORCPT ); Thu, 3 Dec 2015 05:36:55 -0500 Subject: Re: [PATCH v3 1/7] mm/compaction: skip useless pfn when updating cached pfn To: Joonsoo Kim , Andrew Morton References: <1449126681-19647-1-git-send-email-iamjoonsoo.kim@lge.com> <1449126681-19647-2-git-send-email-iamjoonsoo.kim@lge.com> Cc: Mel Gorman , Rik van Riel , David Rientjes , Minchan Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joonsoo Kim From: Vlastimil Babka X-Enigmail-Draft-Status: N1110 Message-ID: <56601B44.609@suse.cz> Date: Thu, 3 Dec 2015 11:36:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1449126681-19647-2-git-send-email-iamjoonsoo.kim@lge.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1891 Lines: 40 On 12/03/2015 08:11 AM, Joonsoo Kim wrote: > Cached pfn is used to determine the start position of scanner > at next compaction run. Current cached pfn points the skipped pageblock > so we uselessly checks whether pageblock is valid for compaction and > skip-bit is set or not. If we set scanner's cached pfn to next pfn of > skipped pageblock, we don't need to do this check. > > This patch moved update_pageblock_skip() to > isolate_(freepages|migratepages). Updating pageblock skip information > isn't relevant to CMA so they are more appropriate place > to update this information. That's step in a good direction, yeah. But why not go as far as some variant of my (not resubmitted) patch "mm, compaction: decouple updating pageblock_skip and cached pfn" [1]. Now the overloading of update_pageblock_skip() is just too much - a struct page pointer for the skip bits, and a pfn of different page for the cached pfn update, that's just more complex than it should be. (I also suspect the pageblock_flags manipulation functions could be simpler if they accepted zone pointer and pfn instead of struct page) Also recently in Aaron's report we found a possible scenario where pageblocks are being skipped without entering the isolate_*_block() functions, and it would make sense to update the cached pfn's in that case, independently of updating pageblock skip bits. But this might be too out of scope of your series, so if you want I can separately look at reviving some useful parts of [1] and the simpler pageblock_flags manipulations. [1] https://lkml.org/lkml/2015/6/10/237 > Signed-off-by: Joonsoo Kim > --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/