From patchwork Sat May 5 20:11:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10382329 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 90A1960467 for ; Sat, 5 May 2018 20:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8147228917 for ; Sat, 5 May 2018 20:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7565F28A3B; Sat, 5 May 2018 20:11:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA7D28917 for ; Sat, 5 May 2018 20:11:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CB606B0269; Sat, 5 May 2018 16:11:13 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 154606B026A; Sat, 5 May 2018 16:11:13 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F38526B026B; Sat, 5 May 2018 16:11:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id 8FB5A6B0269 for ; Sat, 5 May 2018 16:11:12 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id i11-v6so16620858wre.16 for ; Sat, 05 May 2018 13:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:sender:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=Xpf/o7rWovxC+HGEcnpz84D+I/VVhvsTKK5eEcTfYoNjePPMGoeiv0Issqd15qGQ7I yz/eXFX2PtuiEUrAUglEH4hcHgqq6tvVyvN1egEINs1pxvByk/vQerFXPpUyvFt4l98/ XJPjlnadv2Uh0rPktkxSyi+ARvj5AQvSGkSjJLW+m5mk4vMdENUqU/SwlhpJHCaF05m0 NcjHyKAfB+WdMDxfuYFy5hZumyl8Wd20Dc7SkvhJzY/aJkKqYBDgFAW1cpUXx0lJCno6 tPr450HZO1tEgIngha5czll29iztkQ9kgzQRJXGmzVs1fAMmLd5X0VXcU7eqK3JA9k+a CjNA== X-Gm-Message-State: ALQs6tAQkiqKYcvV4Tv2E0MwmHhXFXpwnt101BGmLgC2Am/vJdzjbPSh ZyWFZbM0TcteQycN3F/C0EJP2wLaY4FGlPB7YYm+buOEtrgbvRil3QYSh4hDsWh2thkwsWXM47h An9E9hOrkHv4FHFvnOJ2zSOo/gOSczjBPyQvuEzq8tqs3D8fBXSuzaM5ixFKI+lBhrDXYvi5Ce0 jpIa3ZcLKGqscRaQ8jzamtE3i9ipO5NdFS4yRQoYWi41qloRQ/VezpwXcsrxl2aZd1sZY8tHSQR 0hbz8L0STfPUVSNB7MPRVIfz978/x9aV5T0IO1HoPHt6hmSEnt8DgKLbPhesiKenbpbJwSH+aRj vpwRrX+FSCEZOpWKaweQPcothWzp44cayODTs61jSMWwtuZxC5tMOFcL6og+RdtIW9i3qphxcw= = X-Received: by 10.28.95.131 with SMTP id t125mr20549569wmb.124.1525551072085; Sat, 05 May 2018 13:11:12 -0700 (PDT) X-Received: by 10.28.95.131 with SMTP id t125mr20549552wmb.124.1525551071313; Sat, 05 May 2018 13:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525551071; cv=none; d=google.com; s=arc-20160816; b=PIcbKFmHl5eKkd6E3DpN98JLVQdZic/bhZz3w8QbmxM0MhDh1Xt2KjTNJhi2VH80lX flYAib1a/eO7wnd0YP/yQuajLxIwgDGBRwX7AZ6EV56eDWpUTjyFISCHAEyENHdFSkC2 83c02AXBbi6KMNsBmRWJrlbjMm+c+ReqO+oshr43YtasMLXreLOYeJ1NyOW2n+GCQ+gS AdjVi/H9smMh+W+zm426ZCg8t95i3DC3mVA0odC8mPL1O/H2y8MeOrUhgktdxc4dpPDQ SxKkIqhSzoMlHDK3xWLVqeqbaarxfZpae7hx+By1gx8UkCObXt1R/k9z13MyKri5YbJm +lxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:dkim-signature:arc-authentication-results; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=zk89owxXC4wqbwAgrH5NBCIhSHVqX8if+2u9Ed0RH8BGrYl1rWrzv2Inr/2iIPt3iW g/jMEsiFDrwRMq2ZMuu6mrUC83WE+ILaltdyDhuv8RjKBVTB3fqyojELUJFGc7vs9vnU D3UPUPHp3OU+RcNNnF7utW9joVaigU42Xbqj193hvh9mJWWucgl6eNawrJlxWraG7A4a L1TcwiOt9Q0q6QSUDAk2LuPsuM9ReqxI9fy/GDJYGKTIgxYXKcVSVYQj/Pd3GQhDH10C jZU2Ll3V6uPs4/03AQLdLWzXp+g5recZ/R/mBRi87hkifh8/HpdG7hngz9uPhj67pJbZ XJAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sHvMzpjr; spf=pass (google.com: domain of mathieu.malaterre@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mathieu.malaterre@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k38-v6sor3086704wrk.77.2018.05.05.13.11.11 for (Google Transport Security); Sat, 05 May 2018 13:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of mathieu.malaterre@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sHvMzpjr; spf=pass (google.com: domain of mathieu.malaterre@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mathieu.malaterre@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=sHvMzpjrI8xvDovMBKMcvh/7UmkBa+mO8PSLx0IZFvoHpG/Bk4hTbm7Frg8YpAy976 B+BScpzdnUkkiyRU6L+FOI7QfNpZEeAbE42yseT+oO2/wnUboXDnS7ScYLW5P4oj9gtB GKbqWSi42P0Co1g1+kPjzr1tGeTm13p+TrRN6zoN9bLI8yhciOFHx6hH/RNXCHW53Anf M7sRDfSM8jhaA5KiSE0aszKMkfcocBuaHoAYGH4jnyD9BH0Vt1gnvfx444Eq8fPCFAnq 0wObohz188On2eY6t5wR3B/hLK/deqx21z8jvFCEyVzWwnjPVdp0TrcjoR/OZYmHvDEG 4BQQ== X-Google-Smtp-Source: AB8JxZr5giMTC3bQ+4rMno3a3g3QoOjAHsbdqSpEKbdBmt1I0TygIg3HNjR8aLtN+52X8secq7xTpw== X-Received: by 2002:adf:c3cd:: with SMTP id d13-v6mr21096188wrg.282.1525551070891; Sat, 05 May 2018 13:11:10 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id k89-v6sm5474029wmc.46.2018.05.05.13.11.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 May 2018 13:11:10 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 35C8310C0604; Sat, 5 May 2018 22:11:09 +0200 (CEST) From: Mathieu Malaterre To: Andrew Morton Cc: Mathieu Malaterre , Michal Hocko , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Tetsuo Handa , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] =?UTF-8?q?mm:=20move=20function=20=E2=80=98is=5Fpageblock?= =?UTF-8?q?=5Fremovable=5Fnolock=E2=80=99=20inside=20blockers?= Date: Sat, 5 May 2018 22:11:06 +0200 Message-Id: <20180505201107.21070-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Function ‘is_pageblock_removable_nolock’ is not used unless CONFIG_MEMORY_HOTREMOVE is activated. Move it in between #ifdef sentinel to match prototype in . Silence gcc warning (W=1): mm/page_alloc.c:7704:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre --- mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 905db9d7962f..94ca579938e5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7701,6 +7701,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, return false; } +#ifdef CONFIG_MEMORY_HOTREMOVE bool is_pageblock_removable_nolock(struct page *page) { struct zone *zone; @@ -7723,6 +7724,7 @@ bool is_pageblock_removable_nolock(struct page *page) return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true); } +#endif #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)