From patchwork Wed May 26 20:12:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12282687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81926C47082 for ; Wed, 26 May 2021 20:12:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E0B4D61378 for ; Wed, 26 May 2021 20:12:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0B4D61378 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 764C46B0036; Wed, 26 May 2021 16:12:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73BD46B006E; Wed, 26 May 2021 16:12:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DC306B0070; Wed, 26 May 2021 16:12:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 2BF9E6B0036 for ; Wed, 26 May 2021 16:12:44 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BC6CAAF76 for ; Wed, 26 May 2021 20:12:43 +0000 (UTC) X-FDA: 78184480206.19.3823B43 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by imf25.hostedemail.com (Postfix) with ESMTP id D3BF1600025E for ; Wed, 26 May 2021 20:12:35 +0000 (UTC) Received: by mail-pg1-f170.google.com with SMTP id j12so1890098pgh.7 for ; Wed, 26 May 2021 13:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R308Tm4caxn19xHGz7pM0TIdOHBZX3XBvF5WMLnOo9U=; b=su8nF9w7LG7RnLnxTJbBNyaATWpFMrKEJCHE7SdSa00HBUrStRUCnNfpgq4JHx4C0f X9w12/DuTnwdaRq2aAs3UDFwr3igZ94bOa1idnj1yDWuIQvT0eVkNYZS3gX/TrdOG7Lr yq6o94mQmUsErNU5drbsLi2mJDbq1NY1CiDUXh+zYs83gVujRCvwQWOwxUaR3LRVf6rh WGJmhrsL5Rzd5Q6dL0QfedErmMAyF5Uz/YQgf3Y8GDBcvElwCtS2k6fACnZ3TicqS663 wqigc54lktNjc0+BSoaNcVvCeLPzdgiSuzhAk3OatQaRoMDYpsaZ/36mA+3J8kcDIm3g 3a3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R308Tm4caxn19xHGz7pM0TIdOHBZX3XBvF5WMLnOo9U=; b=Y9jKQYTCueSjkUsaqLt4UOV21PF20W9uTY+vLl1SeOWeIepx9U0zjqh91Wo0n3Rn0f 0gJ08rpRm8lhDxHJ/KYkLex1jIE78ls80Yi3hzuG1hrSRt1+9teZ9YMWptC/1HlYnsaa wIDPeJQHu1xnh119FcJP3kWBmYxCQDasf9kaqkv/qt3mZvXlu8TplKyaSRiQn2Ggyzn8 HpuV5DwLYbQPeHT9k+eIAkrtKqg0joAQ126+r4tF718O/OCIw0mMC1klwBho4pWZ9xHU MtwxaUjxLcX6HP9Cj1dXH6patbedTzTL0Mw/OaUz+P4WfsKrmS0LXJZnV09DLyI/0n2A s0GQ== X-Gm-Message-State: AOAM532QqqqOh87hVE5Iawma8XU3ohlTCqGhdkkMjrGokavi6N+K9Mrd 4Cj3PNQIvqG53sEgUfUMr4w= X-Google-Smtp-Source: ABdhPJzhf/IYwO7BYcCY5iHQZhKv6DVWDkg/OqHSWo7V1NWvN26I0L9N6h/f2AGybqiyzbUXZPF3lg== X-Received: by 2002:aa7:9001:0:b029:2d4:9408:9998 with SMTP id m1-20020aa790010000b02902d494089998mr166302pfo.9.1622059962522; Wed, 26 May 2021 13:12:42 -0700 (PDT) Received: from localhost.localdomain (c-73-93-239-127.hsd1.ca.comcast.net. [73.93.239.127]) by smtp.gmail.com with ESMTPSA id m14sm76733pff.17.2021.05.26.13.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 13:12:41 -0700 (PDT) From: Yang Shi To: hughd@google.com, ziy@nvidia.com, kirill.shutemov@linux.intel.com, minchan@kernel.org, naoya.horiguchi@nec.com, wangyugui@e16-tech.com, akpm@linux-foundation.org Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [v4 PATCH 1/2] mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split Date: Wed, 26 May 2021 13:12:38 -0700 Message-Id: <20210526201239.3351-1-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=su8nF9w7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.170 as permitted sender) smtp.mailfrom=shy828301@gmail.com X-Stat-Signature: k3g9rypyjaeamzk7wfeku4miiefqh9sz X-Rspamd-Queue-Id: D3BF1600025E X-Rspamd-Server: rspam02 X-HE-Tag: 1622059955-84760 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: When debugging the bug reported by Wang Yugui [1], try_to_unmap() may fail, but the first VM_BUG_ON_PAGE() just checks page_mapcount() however it may miss the failure when head page is unmapped but other subpage is mapped. Then the second DEBUG_VM BUG() that check total mapcount would catch it. This may incur some confusion. And this is not a fatal issue, so consolidate the two DEBUG_VM checks into one VM_WARN_ON_ONCE_PAGE(). [1] https://lore.kernel.org/linux-mm/20210412180659.B9E3.409509F4@e16-tech.com/ Reviewed-by: Zi Yan Signed-off-by: Yang Shi Acked-by: Hugh Dickins Acked-by: Kirill A. Shutemov --- v4: Updated the subject and commit log per Hugh. Reordered the patches per Hugh. v3: Incorporated the comments from Hugh. Keep Zi Yan's reviewed-by tag since there is no fundamental change against v2. v2: Removed dead code and updated the comment of try_to_unmap() per Zi Yan. mm/huge_memory.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 19195fca1aee..8827f82c5302 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2336,15 +2336,15 @@ static void unmap_page(struct page *page) { enum ttu_flags ttu_flags = TTU_IGNORE_MLOCK | TTU_RMAP_LOCKED | TTU_SPLIT_HUGE_PMD; - bool unmap_success; VM_BUG_ON_PAGE(!PageHead(page), page); if (PageAnon(page)) ttu_flags |= TTU_SPLIT_FREEZE; - unmap_success = try_to_unmap(page, ttu_flags); - VM_BUG_ON_PAGE(!unmap_success, page); + try_to_unmap(page, ttu_flags); + + VM_WARN_ON_ONCE_PAGE(page_mapped(page), page); } static void remap_page(struct page *page, unsigned int nr) @@ -2655,7 +2655,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) struct deferred_split *ds_queue = get_deferred_split_queue(head); struct anon_vma *anon_vma = NULL; struct address_space *mapping = NULL; - int count, mapcount, extra_pins, ret; + int extra_pins, ret; pgoff_t end; VM_BUG_ON_PAGE(is_huge_zero_page(head), head); @@ -2714,7 +2714,6 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) } unmap_page(head); - VM_BUG_ON_PAGE(compound_mapcount(head), head); /* block interrupt reentry in xa_lock and spinlock */ local_irq_disable(); @@ -2732,9 +2731,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) /* Prevent deferred_split_scan() touching ->_refcount */ spin_lock(&ds_queue->split_queue_lock); - count = page_count(head); - mapcount = total_mapcount(head); - if (!mapcount && page_ref_freeze(head, 1 + extra_pins)) { + if (page_ref_freeze(head, 1 + extra_pins)) { if (!list_empty(page_deferred_list(head))) { ds_queue->split_queue_len--; list_del(page_deferred_list(head)); @@ -2754,16 +2751,9 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) __split_huge_page(page, list, end); ret = 0; } else { - if (IS_ENABLED(CONFIG_DEBUG_VM) && mapcount) { - pr_alert("total_mapcount: %u, page_count(): %u\n", - mapcount, count); - if (PageTail(page)) - dump_page(head, NULL); - dump_page(page, "total_mapcount(head) > 0"); - BUG(); - } spin_unlock(&ds_queue->split_queue_lock); -fail: if (mapping) +fail: + if (mapping) xa_unlock(&mapping->i_pages); local_irq_enable(); remap_page(head, thp_nr_pages(head)); From patchwork Wed May 26 20:12:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12282689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BC38C47088 for ; Wed, 26 May 2021 20:12:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D536F613BF for ; Wed, 26 May 2021 20:12:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D536F613BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 78CC46B006E; Wed, 26 May 2021 16:12:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 764258D0001; Wed, 26 May 2021 16:12:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 603B26B0071; Wed, 26 May 2021 16:12:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 25FFC6B006E for ; Wed, 26 May 2021 16:12:46 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C07E5181AEF3F for ; Wed, 26 May 2021 20:12:45 +0000 (UTC) X-FDA: 78184480290.14.5FED544 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by imf28.hostedemail.com (Postfix) with ESMTP id 9035920007FE for ; Wed, 26 May 2021 20:12:38 +0000 (UTC) Received: by mail-pl1-f176.google.com with SMTP id z4so1179228plg.8 for ; Wed, 26 May 2021 13:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eQOkcldMz8ZV0+0FlIeCmLxH8CE8izOoMLx4OKhr7bA=; b=j+XiyygpxhohjxCJIfcd8c7j7QGFK1GhcNOHOSWFEd2XaOH+FqVXwjRQHzfBGczTOS 49KZBflXn9Axpdr98IEV8WN+yqsIhopR02MI1Y2vRpxj+ZNH0Y8gjSjZou3jqXCzWsg6 O09LpPIUbkLXkv1tvBLsuAMLhAZnpFBz9t2BHvtEXvFZyD1VSAxClFJHf6ldo/saS4BB 1wa5wgyp69QqfdNGybEdCvrYs8WarXnwQ7JPKrjxVrylGoe6bsqPEuekrg3rAG6O8cZP IwdUf5OvmbAhQjAHWMfnAmIY7s/b3OLU/RseHdhPJ/m76EEvqX2AjPtnoQt1s6HUMOil +yxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eQOkcldMz8ZV0+0FlIeCmLxH8CE8izOoMLx4OKhr7bA=; b=dMHr44rk4PTVsxII7vOSo2zNOyYzYfv+KJsU6b79lTOxNnzN97rz3pTxl7gyzKwhrC R0zOLAALBNl+4XhrcjCGIA2LZ/Tfy3Khj2JZxD4kTTMp0HQxUUEeV5QZobsa2obkEBjD azLLirrqSPI5VTmMXO83pxr2kZh4UUxBPMZTjSQD7SPPcEm/ZJjYYp/SV2fXLZ7MvFce o/GxPSqKkxcOsNP8BzjLzhsC06WCQjt1apFfDFj0lzZ+rSx6IparRy+UZA78POUluUXq B6PfBjvrPGuzKUfbHMNm0Zz4yMOrrStXMDXLV1PDvQqMdMNk+vjSAxfhaBDiNqRv7Ipa Nlmg== X-Gm-Message-State: AOAM531rLrm8ZmOJVQTdXdqGRaAoLBcPEUy7AEEWp3x6CROldSHv2NRf xjTqytrPaH7749afB3DVSQI= X-Google-Smtp-Source: ABdhPJxjC/GA4ohp7Rah2L2JWZQyzkVwgTOuOa3pGRpZkHsVPhCo4VzK9KoIaqSpbPHzgEj1ZE6FMg== X-Received: by 2002:a17:90a:ec05:: with SMTP id l5mr5764953pjy.141.1622059964600; Wed, 26 May 2021 13:12:44 -0700 (PDT) Received: from localhost.localdomain (c-73-93-239-127.hsd1.ca.comcast.net. [73.93.239.127]) by smtp.gmail.com with ESMTPSA id m14sm76733pff.17.2021.05.26.13.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 13:12:43 -0700 (PDT) From: Yang Shi To: hughd@google.com, ziy@nvidia.com, kirill.shutemov@linux.intel.com, minchan@kernel.org, naoya.horiguchi@nec.com, wangyugui@e16-tech.com, akpm@linux-foundation.org Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [v4 PATCH 2/2] mm: rmap: make try_to_unmap() void function Date: Wed, 26 May 2021 13:12:39 -0700 Message-Id: <20210526201239.3351-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210526201239.3351-1-shy828301@gmail.com> References: <20210526201239.3351-1-shy828301@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 9035920007FE Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=j+Xiyygp; spf=pass (imf28.hostedemail.com: domain of shy828301@gmail.com designates 209.85.214.176 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Stat-Signature: 8fjxakk6z6w15eon1uni83qfdknh3bce X-HE-Tag: 1622059958-245252 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: Currently try_to_unmap() return bool value by checking page_mapcount(), however this may return false positive since page_mapcount() doesn't check all subpages of compound page. The total_mapcount() could be used instead, but its cost is higher since it traverses all subpages. Actually the most callers of try_to_unmap() don't care about the return value at all. So just need check if page is still mapped by page_mapped() when necessary. And page_mapped() does bail out early when it finds mapped subpage. Suggested-by: Hugh Dickins Acked-by: Hugh Dickins Signed-off-by: Yang Shi Acked-by: Minchan Kim Reviewed-by: Shakeel Butt --- v4: Updated the comment of try_to_unmap() per Minchan. Minor fix and patch reorder per Hugh. Collected ack tag from Hugh. include/linux/rmap.h | 2 +- mm/memory-failure.c | 15 +++++++-------- mm/rmap.c | 7 +++---- mm/vmscan.c | 3 ++- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/linux/rmap.h b/include/linux/rmap.h index def5c62c93b3..116cb193110a 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -194,7 +194,7 @@ static inline void page_dup_rmap(struct page *page, bool compound) int page_referenced(struct page *, int is_locked, struct mem_cgroup *memcg, unsigned long *vm_flags); -bool try_to_unmap(struct page *, enum ttu_flags flags); +void try_to_unmap(struct page *, enum ttu_flags flags); /* Avoid racy checks */ #define PVMW_SYNC (1 << 0) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9dcc9bcea731..07e462588df9 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1063,7 +1063,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, enum ttu_flags ttu = TTU_IGNORE_MLOCK; struct address_space *mapping; LIST_HEAD(tokill); - bool unmap_success = true; + bool unmap_success; int kill = 1, forcekill; struct page *hpage = *hpagep; bool mlocked = PageMlocked(hpage); @@ -1126,7 +1126,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, collect_procs(hpage, &tokill, flags & MF_ACTION_REQUIRED); if (!PageHuge(hpage)) { - unmap_success = try_to_unmap(hpage, ttu); + try_to_unmap(hpage, ttu); } else { if (!PageAnon(hpage)) { /* @@ -1138,17 +1138,16 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, */ mapping = hugetlb_page_mapping_lock_write(hpage); if (mapping) { - unmap_success = try_to_unmap(hpage, - ttu|TTU_RMAP_LOCKED); + try_to_unmap(hpage, ttu|TTU_RMAP_LOCKED); i_mmap_unlock_write(mapping); - } else { + } else pr_info("Memory failure: %#lx: could not lock mapping for mapped huge page\n", pfn); - unmap_success = false; - } } else { - unmap_success = try_to_unmap(hpage, ttu); + try_to_unmap(hpage, ttu); } } + + unmap_success = !page_mapped(hpage); if (!unmap_success) pr_err("Memory failure: %#lx: failed to unmap page (mapcount=%d)\n", pfn, page_mapcount(hpage)); diff --git a/mm/rmap.c b/mm/rmap.c index a35cbbbded0d..d4e0d89726b8 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1749,9 +1749,10 @@ static int page_not_mapped(struct page *page) * Tries to remove all the page table entries which are mapping this * page, used in the pageout path. Caller must hold the page lock. * - * If unmap is successful, return true. Otherwise, false. + * It is the callers' responsibility to check if the page is still + * mapped when needed. */ -bool try_to_unmap(struct page *page, enum ttu_flags flags) +void try_to_unmap(struct page *page, enum ttu_flags flags) { struct rmap_walk_control rwc = { .rmap_one = try_to_unmap_one, @@ -1776,8 +1777,6 @@ bool try_to_unmap(struct page *page, enum ttu_flags flags) rmap_walk_locked(page, &rwc); else rmap_walk(page, &rwc); - - return !page_mapcount(page) ? true : false; } /** diff --git a/mm/vmscan.c b/mm/vmscan.c index f96d62159720..fa5052ace415 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1499,7 +1499,8 @@ static unsigned int shrink_page_list(struct list_head *page_list, if (unlikely(PageTransHuge(page))) flags |= TTU_SPLIT_HUGE_PMD; - if (!try_to_unmap(page, flags)) { + try_to_unmap(page, flags); + if (page_mapped(page)) { stat->nr_unmap_fail += nr_pages; if (!was_swapbacked && PageSwapBacked(page)) stat->nr_lazyfree_fail += nr_pages;