Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8102144imu; Tue, 4 Dec 2018 03:03:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDuUE5LWtppEq77FRitkICeKi/BR+rb6CwuGAQvYFt1UAE44wZZ0rRHsUOXPBVJkTFvEKX X-Received: by 2002:a62:184e:: with SMTP id 75mr19233750pfy.28.1543921380886; Tue, 04 Dec 2018 03:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543921380; cv=none; d=google.com; s=arc-20160816; b=La1gkHPWsf4lYAS0hjdxly3p5YnhbTAqbo1jwzM07PgIamzF3k3Pm27Hd3koW28COF pQVU5erlLBYhewVEkul2yowUWbbMxNF/8tGK7hzefn9rVUaHkjQgD8vtXS5ISLjn1eh4 MlHu6Vur7JZ6EKSJ7v3ezvHpgYzMb37wZN8k8qpCjrVWOlXBO828EtTyd5BMjWwJRABW M72FoGo8UvPsBd9eP2UZwj+BkTrHz+dGTWDZ2qmNBOH/8tP0TVn9hf0GVl6k/DKHHyyH IFJhaN+irTUVTi4TxoO5Y495EP7nSurpuOrHkDxTtZgODA7zvxcFHOgXh0rsSstI2euK xAGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pO91BNVlMepVu8BZTzlOhElWTd81kEFyW+hSgn9OoJc=; b=xbYDMDXpW4M5HfhZCGFR6pG30oOG4TAhCEktaNHZ/Ga/ABOElKR6Elf4+8NmabnzHm jG8AkHP9k+IpxdhuzasmD3+vuqThb/sYuAP/mG1Dk74FKinkG94HotIiTg0585oNfsQ7 mEP8n/7TVWp6osb0tb/amB4u0VEZ2HcmCpuMf6daXD1CoUxr18hN1VbzPSt18jnIRJ6Q PpCovY2yX3h1jBK+Mnlt4aNyYYCaBxXI5haVP8E70UVI6CfURCrVNWA1KGuBH6KQs/9d VpKNtn6DIES0VtYmstLDmNFM/BNwLFxthgwocl6x9g5V5Q/O92r5di0p0DjdYR8eeBG7 IzDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xFdLD+tN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m142si19459719pfd.171.2018.12.04.03.02.44; Tue, 04 Dec 2018 03:03:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xFdLD+tN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727465AbeLDLBT (ORCPT + 99 others); Tue, 4 Dec 2018 06:01:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:46684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbeLDLBQ (ORCPT ); Tue, 4 Dec 2018 06:01:16 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A70162146D; Tue, 4 Dec 2018 11:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921275; bh=Gk07QEuLu4OBgEBIVqq9uy1KfwyIqe6uBI8PVyOhErY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xFdLD+tNKM5T2kH54KmPedXNfgpPA1zbz/bI5VSYA8UzmJkJaV0AxQaXpaK/18042 E0eC/xaeZlwd9IofkY2f4hpxYprfkuGgvTZIU0Hd2cjXgzNf+XKhxvpsnl9z0Lbvo1 lCvyvuUrntl+CRMj2tdLny0ytmPVQE+jww4njHsw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hugh Dickins , "Kirill A. Shutemov" , Jerome Glisse , Konstantin Khlebnikov , Matthew Wilcox , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.14 001/146] mm/huge_memory: rename freeze_page() to unmap_page() Date: Tue, 4 Dec 2018 11:48:07 +0100 Message-Id: <20181204103726.808995724@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103726.750894136@linuxfoundation.org> References: <20181204103726.750894136@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ commit 906f9cdfc2a0800f13683f9e4ebdfd08c12ee81b upstream. The term "freeze" is used in several ways in the kernel, and in mm it has the particular meaning of forcing page refcount temporarily to 0. freeze_page() is just too confusing a name for a function that unmaps a page: rename it unmap_page(), and rename unfreeze_page() remap_page(). Went to change the mention of freeze_page() added later in mm/rmap.c, but found it to be incorrect: ordinary page reclaim reaches there too; but the substance of the comment still seems correct, so edit it down. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261514080.2275@eggly.anvils Fixes: e9b61f19858a5 ("thp: reintroduce split_huge_page()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Jerome Glisse Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- mm/huge_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index adacfe66cf3d..09d7e9c4de89 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2280,7 +2280,7 @@ void vma_adjust_trans_huge(struct vm_area_struct *vma, } } -static void freeze_page(struct page *page) +static void unmap_page(struct page *page) { enum ttu_flags ttu_flags = TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS | TTU_RMAP_LOCKED | TTU_SPLIT_HUGE_PMD; @@ -2295,7 +2295,7 @@ static void freeze_page(struct page *page) VM_BUG_ON_PAGE(!unmap_success, page); } -static void unfreeze_page(struct page *page) +static void remap_page(struct page *page) { int i; if (PageTransHuge(page)) { @@ -2412,7 +2412,7 @@ static void __split_huge_page(struct page *page, struct list_head *list, spin_unlock_irqrestore(zone_lru_lock(page_zone(head)), flags); - unfreeze_page(head); + remap_page(head); for (i = 0; i < HPAGE_PMD_NR; i++) { struct page *subpage = head + i; @@ -2593,7 +2593,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) } /* - * Racy check if we can split the page, before freeze_page() will + * Racy check if we can split the page, before unmap_page() will * split PMDs */ if (!can_split_huge_page(head, &extra_pins)) { @@ -2602,7 +2602,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) } mlocked = PageMlocked(page); - freeze_page(head); + unmap_page(head); VM_BUG_ON_PAGE(compound_mapcount(head), head); /* Make sure the page is not on per-CPU pagevec as it takes pin */ @@ -2659,7 +2659,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) fail: if (mapping) spin_unlock(&mapping->tree_lock); spin_unlock_irqrestore(zone_lru_lock(page_zone(head)), flags); - unfreeze_page(head); + remap_page(head); ret = -EBUSY; } -- 2.17.1