From patchwork Thu Nov 8 06:59:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 12760 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 514C823E01 for ; Thu, 8 Nov 2012 06:59:46 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id E476BA1931E for ; Thu, 8 Nov 2012 06:59:45 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3563982iej.11 for ; Wed, 07 Nov 2012 22:59:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:date:message-id:x-mailer:x-brightmail-tracker:cc:subject :x-beenthere:x-mailman-version:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-gm-message-state; bh=N4yraWm+rJmhoBN37r1KFHYnkb6q0+QyO/fNyXcnR5w=; b=OUICrQ4/kltXSshLQX7UinSu7g0ok4XNd3vQIpbdS8GcRMUFfO7OLxnUOmSfxmcnNN hvJeEwCkjwzBshM5Ek8JE/CRJ72VVjMp5FmWsyMePi3yDYGH5+R3q2543XqbWO/xhmGE ANLE55hfVc2GDdOvRuOtCsmiHYm6M+a0VxzPxraYCv6S924Ch7FD8gKhK0yeaHEM6fYW vgvwg/jJsywxRHH6HZZE9SyE3Dugb2Kunrxhxk236UCvqIEcpiv7c16PU8dii1TWjD7y ZWI+zY1l8Otw/oGUkWbjqPaRDqrGK6DPZELWDh37yY5D0hvUBmvCALKgKJyWjC7lwM8Q W+GQ== Received: by 10.50.88.233 with SMTP id bj9mr6998744igb.70.1352357985709; Wed, 07 Nov 2012 22:59:45 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp331861igt; Wed, 7 Nov 2012 22:59:45 -0800 (PST) Received: by 10.204.6.75 with SMTP id 11mr1696226bky.10.1352357983947; Wed, 07 Nov 2012 22:59:43 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id hw12si34684069bkc.97.2012.11.07.22.59.41; Wed, 07 Nov 2012 22:59:43 -0800 (PST) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TWM5T-0006nU-Dr; Thu, 08 Nov 2012 06:59:39 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TWM5R-0006n7-4e for linaro-mm-sig@lists.linaro.org; Thu, 08 Nov 2012 06:59:37 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD50040HQ33HQO0@mailout1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 08 Nov 2012 15:59:33 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-c6-509b5855a592 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id BF.11.01231.5585B905; Thu, 08 Nov 2012 15:59:33 +0900 (KST) Received: from localhost.localdomain ([106.116.147.30]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD500BFIQ30NSE1@mmp2.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 08 Nov 2012 15:59:33 +0900 (KST) From: Marek Szyprowski To: linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org Date: Thu, 08 Nov 2012 07:59:04 +0100 Message-id: <1352357944-14830-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNJMWRmVeSWpSXmKPExsVy+t9jQd3QiNkBBs/2aFp8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGbPXrWMuWMJZMfnICqYGxpPsXYycHBICJhLHr3xig7DFJC7c Ww9kc3EICUxnlGhdtZkFwlnFJDHj9SEWkCo2AUOJrrddYB0iAmESfxq3sYIUMQscZ5L4c3Et WEJYIFbi2KKrjCA2i4CqxIO1z8DW8Qp4SNz6txfI5gBapyAxZ5LNBEbuBYwMqxhFUwuSC4qT 0nMN9YoTc4tL89L1kvNzNzGCvfhMagfjygaLQ4wCHIxKPLwakrMDhFgTy4orcw8xSnAwK4nw LnMGCvGmJFZWpRblxxeV5qQWH2KU5mBREudt9kgJEBJITyxJzU5NLUgtgskycXBKNTBOjylM Zb/0xGAqz4nZr91nSs+svHK/59Kn28ynhFKYWY89O/A+VOmt81l2r7C+bueK2qezN4pK/1iw jPP3CXmVZC1uUd7Vl03OpRpGzFKxPrD8h6FEbPtHhxs6EW8EbXL96zl/3hD+FbJydaL3XjWX k9tVBK2bxXenMv34tPfGns07j60X6d6lxFKckWioxVxUnAgA+/0CZd4BAAA= Cc: Arnd Bergmann , Bartlomiej Zolnierkiewicz , Mel Gorman , Michal Nazarewicz , Minchan Kim , Kyungmin Park , Andrew Morton Subject: [Linaro-mm-sig] [PATCH] mm: skip watermarks check for already isolated blocks in split_free_page() X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQlHI62spmwtfofC3KaVBgoHmIo9Oh32nuzoG8uG/qlM2/ZReC8FBX0VgcVQvbrCyf5qK+B6 Since commit 2139cbe627b8 ("cma: fix counting of isolated pages") free pages in isolated pageblocks are not accounted to NR_FREE_PAGES counters, so watermarks check is not required if one operates on a free page in isolated pageblock. Signed-off-by: Marek Szyprowski --- mm/page_alloc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fd154fe..43ab09f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1394,10 +1394,12 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype) zone = page_zone(page); order = page_order(page); - /* Obey watermarks as if the page was being allocated */ - watermark = low_wmark_pages(zone) + (1 << order); - if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) - return 0; + if (get_pageblock_migratetype(page) != MIGRATE_ISOLATE) { + /* Obey watermarks as if the page was being allocated */ + watermark = low_wmark_pages(zone) + (1 << order); + if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) + return 0; + } /* Remove page from free list */ list_del(&page->lru);