From patchwork Wed Nov 14 21:17:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10683109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56EE014BA for ; Wed, 14 Nov 2018 21:17:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 494352B6B5 for ; Wed, 14 Nov 2018 21:17:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D5582B9C6; Wed, 14 Nov 2018 21:17:50 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 CD0712B6B5 for ; Wed, 14 Nov 2018 21:17:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E41366B000D; Wed, 14 Nov 2018 16:17:48 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DF0826B000E; Wed, 14 Nov 2018 16:17:48 -0500 (EST) 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 CDF9E6B0010; Wed, 14 Nov 2018 16:17:48 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by kanga.kvack.org (Postfix) with ESMTP id A55616B000D for ; Wed, 14 Nov 2018 16:17:48 -0500 (EST) Received: by mail-qk1-f199.google.com with SMTP id y83so40099579qka.7 for ; Wed, 14 Nov 2018 13:17:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=7ruAZHqQ0sPulerJ+Cgh2XJaAVK7EPCZD8dz6/M4Z64=; b=th76NtPn4EQkM5caC2wdBJNL73+VraDpUT8QgTBtrua3pCj6wZqCHUvKO4J4z8UFcJ RLUHqboC7rHQdoxA4VbBkfrtw7xfY8JqgqPigwSPwXiOd7lOBuS9N3meoMbjWRPmN9P4 YZIHqIUCQbKd6hxPBFrvrooUWVHoF0foPJumsZXdQIauqIk5XWRJU6WoW8hXtmibDGp+ 5BuFkfTtTzjks/wJBb5iJSUaLcCUL7X8QmDrv6PydYecpCvbtKWb3ysbjTez0uCNQadl tbFf56MZvpObq5HYsDVtJ5VnXuLj5pWDTDwLwiMu58l9aSsidEZYp13szKbRwPv7lqur nOBQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AGRZ1gJLuTjtVBFZUcno+lgqsyBxs0puYziwhMImxAADcOpP/4sO22AA h9j1j/ch7myF6H21r8PhM4IhThPRbc3zRkpRjqornI6+5zgif4sjxHj7vuA7EoPXF9WcgGjrFdX nNwFzG6OTkItLum24t3YwVNwkH7mza31ctzPGNOzZ4y0oaTlX2jE4pJNqXE7a7Y45bQ== X-Received: by 2002:ac8:39c2:: with SMTP id v60mr3433243qte.142.1542230268433; Wed, 14 Nov 2018 13:17:48 -0800 (PST) X-Google-Smtp-Source: AJdET5ctnp+xqLe4aEHbjmvS5miXoqZZck1GN5je3JqT4QLjM7qKNRXLU+DTil01FlLc0QhwUHS3 X-Received: by 2002:ac8:39c2:: with SMTP id v60mr3433223qte.142.1542230267973; Wed, 14 Nov 2018 13:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542230267; cv=none; d=google.com; s=arc-20160816; b=YGnp3L5W9hz405ve+1eNz7KDJiYz9PH26rAZ+dvNo4wQwqMK6Q1uTxRzXzKT3ofMz/ gpg1UiaEYDQV1A3LI1C7dns3tZpU4IM1f9RB90+Dxe03mq7QQ4dmbUv/Uv3RKnU00fIL n7/JrGkeI/HHQ3w8VQn2oJzlayhqFe9PUaqMSg/zOnH80LCVhkF19oDqHGYq5L12HEdm fO64L/oa/9L4DxfIrZW8JuF4Z57sMnVyjgjIykjK2o68UwaifhzpPZGrMZvTcfraBnFF 7lflXfGcMT1+tM7XN0y2B/tZgtL1oZvA2Fl00+rGTks+cZDWNvK1RLxFEW9ReAcH81kn kUJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=7ruAZHqQ0sPulerJ+Cgh2XJaAVK7EPCZD8dz6/M4Z64=; b=qOf1dXdhbSppzBEIVOxAuZy8bRTmhnW91X+BpKjjfYLuns7ApW08E9aFcdp5ZL9Quz Y4Aw+RX+3+cX5IgF0Q/+FBhQTg/G8h5fAnsyZv5f1NQEox5v4QJAqo63nwsfpOA46ZQC AL5+VK2RqHdzIbNE3EyJrhw9shFHBqUYQC+gjLrirFo6zFhXmadC5W/6kkO0yYanpcGX wvRJyICZr/yJBepqBZzat168KfPBXBjblgERV7kWV9fYhWyRWKgHZZWedvIKtLPGrlTf jvdQjT2YDYUmilSabCX0EgqFuAS3s+pteoIQRi1JOyRXZRKYQC8yT7+YcJKndXydW85J Pubg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id n32si549496qtd.130.2018.11.14.13.17.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 13:17:47 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74AF130BF479; Wed, 14 Nov 2018 21:17:46 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-99.ams2.redhat.com [10.36.116.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6725361491; Wed, 14 Nov 2018 21:17:31 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devel@linuxdriverproject.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org, xen-devel@lists.xenproject.org, David Hildenbrand , Andrew Morton , Dave Young , "Kirill A. Shutemov" , Baoquan He , Omar Sandoval , Arnd Bergmann , Matthew Wilcox , Michal Hocko , "Michael S. Tsirkin" Subject: [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO Date: Wed, 14 Nov 2018 22:17:01 +0100 Message-Id: <20181114211704.6381-4-david@redhat.com> In-Reply-To: <20181114211704.6381-1-david@redhat.com> References: <20181114211704.6381-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 14 Nov 2018 21:17:47 +0000 (UTC) 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 Let's export PG_offline via PAGE_OFFLINE_MAPCOUNT_VALUE, so makedumpfile can directly skip pages that are logically offline and the content therefore stale. Cc: Andrew Morton Cc: Dave Young Cc: "Kirill A. Shutemov" Cc: Baoquan He Cc: Omar Sandoval Cc: Arnd Bergmann Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- kernel/crash_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 933cb3e45b98..093c9f917ed0 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -464,6 +464,8 @@ static int __init crash_save_vmcoreinfo_init(void) VMCOREINFO_NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE); #ifdef CONFIG_HUGETLB_PAGE VMCOREINFO_NUMBER(HUGETLB_PAGE_DTOR); +#define PAGE_OFFLINE_MAPCOUNT_VALUE (~PG_offline) + VMCOREINFO_NUMBER(PAGE_OFFLINE_MAPCOUNT_VALUE); #endif arch_crash_save_vmcoreinfo();