From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id E77E36B246F for ; Wed, 21 Nov 2018 01:05:15 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id w185so5746579qka.9 for ; Tue, 20 Nov 2018 22:05:15 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id g67si2351378qkc.228.2018.11.20.22.05.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 22:05:14 -0800 (PST) Date: Wed, 21 Nov 2018 14:04:58 +0800 From: Baoquan He 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> Sender: owner-linux-mm@kvack.org List-ID: 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 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