From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f198.google.com (mail-wj0-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 8C8E444059E for ; Wed, 15 Feb 2017 15:12:02 -0500 (EST) Received: by mail-wj0-f198.google.com with SMTP id h7so66719365wjy.6 for ; Wed, 15 Feb 2017 12:12:02 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id o43si6370749wrc.37.2017.02.15.12.12.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 15 Feb 2017 12:12:01 -0800 (PST) Subject: Re: [PATCH v2 00/10] try to reduce fragmenting fallbacks References: <20170210172343.30283-1-vbabka@suse.cz> <20170213110701.vb4e6zrwhwliwm7k@techsingularity.net> <37f46f4c-4006-a76a-bf0a-5a4e3b0d68e6@suse.cz> From: Vlastimil Babka Message-ID: <71f5642e-7efa-3d05-b012-defe9d339e0a@suse.cz> Date: Wed, 15 Feb 2017 21:11:57 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: linux-mm@kvack.org, Johannes Weiner , Joonsoo Kim , David Rientjes , linux-kernel@vger.kernel.org, kernel-team@fb.com On 15.2.2017 17:11, Vlastimil Babka wrote: > On 02/15/2017 03:29 PM, Vlastimil Babka wrote: >> Results for patch 4 ("count movable pages when stealing from pageblock") >> are really puzzling me, as it increases the number of fragmenting events >> for reclaimable allocations, implicating "reclaimable placed with (i.e. >> falling back to) unmovable" (which is not listed separately above, but >> follows logically from "reclaimable placed with movable" not changing >> that much). I really wonder why is that. The patch effectively only >> changes the decision to change migratetype of a pageblock, it doesn't >> affect the actual stealing decision (which is always true for >> RECLAIMABLE anyway, see can_steal_fallback()). Moreover, since we can't >> distinguish UNMOVABLE from RECLAIMABLE when counting, good_pages is 0 >> and thus even the decision to change pageblock migratetype shouldn't be >> changed by the patch for this case. I must recheck the implementation... > > Ah, there it is... not enough LISP > > - if (pages >= (1 << (pageblock_order-1)) || > + /* Claim the whole block if over half of it is free or good type */ > + if (free_pages + good_pages >= (1 << (pageblock_order-1)) || Nope, I was blind and thought that this needs "(free_pages + good_pages)" because of operator priority wrt shifting, but >= is not shift... bah. -- 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