From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 009CC7D08E for ; Wed, 21 Nov 2018 06:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbeKUQiS (ORCPT ); Wed, 21 Nov 2018 11:38:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52882 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbeKUQiR (ORCPT ); Wed, 21 Nov 2018 11:38:17 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D1BBC049592; Wed, 21 Nov 2018 06:05:13 +0000 (UTC) Received: from localhost (ovpn-8-29.pek2.redhat.com [10.72.8.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F1DC103BAB7; Wed, 21 Nov 2018 06:05:01 +0000 (UTC) Date: Wed, 21 Nov 2018 14:04:58 +0800 From: Baoquan He To: David Hildenbrand Cc: linux-mm@kvack.org, Michal Hocko , Arnd Bergmann , linux-pm@vger.kernel.org, pv-drivers@vmware.com, Borislav Petkov , linux-doc@vger.kernel.org, kexec-ml , linux-kernel@vger.kernel.org, Matthew Wilcox , Omar Sandoval , Kazuhito Hagio , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, linux-fsdevel@vger.kernel.org, devel@linuxdriverproject.org, Dave Young , Andrew Morton , "Kirill A. Shutemov" , Lianbo Jiang Subject: Re: [PATCH v1 3/8] kexec: export PG_offline to VMCOREINFO Message-ID: <20181121060458.GC7386@MiWiFi-R3L-srv> References: <20181119101616.8901-1-david@redhat.com> <20181119101616.8901-4-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181119101616.8901-4-david@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 21 Nov 2018 06:05:14 +0000 (UTC) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 11/19/18 at 11:16am, David Hildenbrand wrote: > 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 This solution looks good to me. One small concern is why we don't export PG_offline to vmcoreinfo directly, then define PAGE_OFFLINE_MAPCOUNT_VALUE in makedumpfile. We have been exporting kernel data/MACRO directly, why this one is exceptional. Thanks Baoquan