Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1494081pxx; Fri, 30 Oct 2020 11:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2JJOw4J7Hi4vZk+8C6ZXzwKYJpGaj0ZtUHmwmR/YgFew+iIZmSuRry/OfyO5eskXsZqhf X-Received: by 2002:a17:906:14d1:: with SMTP id y17mr3859717ejc.15.1604081726026; Fri, 30 Oct 2020 11:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604081726; cv=none; d=google.com; s=arc-20160816; b=YBwfN+w8dZyS6EIDQ6xKYNzUB3C9+qtPweXL3+ydZQnasw36XIx+KUTx0BEv/d8nCs D0FO8Trgy4BihST+ldbvPY47gAK4ZFEVZWECeJcCrHVGjD2bH8pHcRGi0oiQC88ofnAa 3hGZHvSUzl29Io5md51yAN0kfL65PojXCQrk8YAeT1q1QBik6Vns4KQo+G3NAcLv3b6V rbtl3FiatICg8i4GrT9lhIwkE4V6BghO4l0Qm1nRl1s0aL6kqqzXiP46td+T6hNd7uvI OMWAfRkxjCazs//vVerSGSaJQMNUi/Uptqq/C/5RHr8C5FK1vrO9dHtLC2tmBgwuUVJk v0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m8D81kklIjOy7BvetEpdxNnGltgLU0sCcywzvVcT1hA=; b=irfikyCt6uV8d4pggGOJ3ZwcZGIfkFbL5ISfvn5Ejq+6+tVAy1ABdNGvYVWQXsa/FV tFu1a/WCjaBVp1P7EYUISAyK8vEEZGU/KR+H29By7ingbPrnukAM5Dfq6olaFyF59Yfc t0D97Pz74Y80Bikf28rQzrm5oL1nuR6nZScQZI1qLbMDWrNqO0baHR7lruAaOjOxaLj5 pydPhxBHcRrhZTqgt0J9rv34ivpjJ+ZanLKhNzaLR5pax65cBaD4SxGhIbTD5Pj03JnQ xJ3TPnfiW8zAvZkl5eL65DfgcAGJDHx/HU60Msz9YOv8oeA5jXY2IuAwA6XCfpc839eR OA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=crzvGERl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si4663181eje.415.2020.10.30.11.15.02; Fri, 30 Oct 2020 11:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=crzvGERl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbgJ3SND (ORCPT + 99 others); Fri, 30 Oct 2020 14:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbgJ3SNC (ORCPT ); Fri, 30 Oct 2020 14:13:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B27C0613D5; Fri, 30 Oct 2020 11:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=m8D81kklIjOy7BvetEpdxNnGltgLU0sCcywzvVcT1hA=; b=crzvGERlf5EcYfWKpM3cyPxDmE SAozR2s9RBQuRy96mRAYuBOrsj+W1qYpMTYjkDYEmmT3L+oiS8Dho6f1kHFzddDA/snR2kjsDkzkA LxOUrdaCbBc5FECvupoxpdAZHL52BTQ437eQJWvAS57TItQZ5MMk4uPnFQs2aiisxoivVquL+LHZ8 LuDWiB87FO7PpT8NuLpB+9OO25vM6nQ9sD/onj3bx7BW0Ef2SOHqn1GH/BSW2mvdxc6nA7wxgGnIV lwyhBl+fyc1ar7gtz2m7dNd3VevGzDc57v+tSg4TQXm1XYk1vjx5mg1kHXs7LU6wLeKpMHsdfA/xh zKJzHS9g==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYYtK-00052F-5N; Fri, 30 Oct 2020 18:12:46 +0000 Date: Fri, 30 Oct 2020 18:12:46 +0000 From: Matthew Wilcox To: Zi Yan Cc: Andrew Morton , linux-mm@kvack.org, Yang Shi , Michal Hocko , Vlastimil Babka , Rik van Riel , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/2] mm/compaction: count pages and stop correctly during page isolation. Message-ID: <20201030181246.GM27442@casper.infradead.org> References: <20201030155716.3614401-1-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201030155716.3614401-1-zi.yan@sent.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2020 at 11:57:15AM -0400, Zi Yan wrote: > In isolate_migratepages_block, when cc->alloc_contig is true, we are > able to isolate compound pages, nr_migratepages and nr_isolated did not > count compound pages correctly, causing us to isolate more pages than we > thought. Use thp_nr_pages to count pages. Otherwise, we might be trapped ^^^^^^^^^^^^ Maybe replace that sentence with "Count compound pages as the number of base pages they contain"?