Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1469360imu; Wed, 23 Jan 2019 18:18:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN73ZanYWgBzaMGnd9oEpFa5ZImeto9FI0G5bqvAX1K8clem0EhJYDtinUD4K8W7tm46MsHf X-Received: by 2002:a63:9c1a:: with SMTP id f26mr4244521pge.381.1548296311026; Wed, 23 Jan 2019 18:18:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548296310; cv=none; d=google.com; s=arc-20160816; b=WU5/UMqSHAY0YFpztgyz30amYVLm8s9SgSjN06A2J678VECm/6MvFZUJpccPZHN/wK hg2VKpei4tAE97jMuTMYrC2LLngxaXL3Al0PiJeQ4NUa8YtslehasAgl9rsORroqH79V /vk8m21k+6xWvHHvj/fRV99XsLtXowqXJhsEAhV/Itgtpe8FObVq0WRGv+uDJXPYMyJv AECcT8xdeNYRVM6NWoaBayUIEgWTJylN3ISquVU7aKThMmMtBH3m7OedWd48m7Kml9JF PmKXgdAc2F99Tw/KlihcCv4JAKYI2GXrv/9KY2fNpUoFOhFs1Oi3mlHgadIer3rrJr4U LyNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JMPrak87j86XeGHnfjCopr5uG/oPg7dH2oDjkFHUPqQ=; b=nUG6mKkNsuSEUCrdAag+3UO3MwuIp2rwkN5lYuy6WXHYHM7ReM7B9XGUwqXx6Zv/9F l0+PaCGBc7sK7npnsyk5yQTNqAeIucW5L+ha3H1OCSvgJcWDW1LmvcYFmSKptbRFRuVc me+eUNIwyO28EkrsBmyfw8zjBRRK+/Xs5rUaCwVQDmECA5CV2H+hIOTWf9uDRTZBVpvA Sg2POHUOWdmJ4fv7oz3swsiiWVG1LNVu9KJDahZLAR4sIPDWRa9asB1w+xURS5QrsP1J CZTapV82YUUKnBPbJ+y+eAImbaqJrCQI32NK2VJXuPxSX4UDxuRF7jW2an/f3qICLDZV GT9g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e68si20268061pfb.101.2019.01.23.18.18.15; Wed, 23 Jan 2019 18:18:30 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfAXCRv (ORCPT + 99 others); Wed, 23 Jan 2019 21:17:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37966 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbfAXCRu (ORCPT ); Wed, 23 Jan 2019 21:17:50 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 729BF83F4C; Thu, 24 Jan 2019 02:17:50 +0000 (UTC) Received: from localhost (ovpn-12-50.pek2.redhat.com [10.72.12.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D49655D6A6; Thu, 24 Jan 2019 02:17:46 +0000 (UTC) Date: Thu, 24 Jan 2019 10:17:44 +0800 From: Baoquan He To: Kairui Song Cc: Linux Kernel Mailing List , Thomas Gleixner , Borislav Petkov , Ingo Molnar , "H. Peter Anvin" , jbohac@suse.cz, adobriyan@gmail.com, Andrew Morton , osandov@fb.com, Bhupesh Sharma , Dave Young Subject: Re: [PATCH v2] x86/gart/kcore: Exclude GART aperture from kcore Message-ID: <20190124021744.GB19177@MiWiFi-R3L-srv> References: <20190102105408.7124-1-kasong@redhat.com> <20190123141432.GA19177@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 24 Jan 2019 02:17:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/23/19 at 10:50pm, Kairui Song wrote: > > > int fix_aperture __initdata = 1; > > > > > > -#ifdef CONFIG_PROC_VMCORE > > > +#if defined(CONFIG_PROC_VMCORE) || defined(CONFIG_PROC_KCORE) > > > /* > > > * If the first kernel maps the aperture over e820 RAM, the kdump kernel will > > > * use the same range because it will remain configured in the northbridge. > > > @@ -66,7 +67,7 @@ int fix_aperture __initdata = 1; > > > */ > > > static unsigned long aperture_pfn_start, aperture_page_count; > > > > > > -static int gart_oldmem_pfn_is_ram(unsigned long pfn) > > > +static int gart_mem_pfn_is_ram(unsigned long pfn) > > > { > > > return likely((pfn < aperture_pfn_start) || > > > (pfn >= aperture_pfn_start + aperture_page_count)); > > > @@ -76,7 +77,12 @@ static void exclude_from_vmcore(u64 aper_base, u32 aper_order) > > > > Shouldn't this function name be changed? It's not only handling vmcore > > stuff any more, but also kcore. And this function is not excluding, but > > resgistering. > > > > Other than this, it looks good to me. > > > > Thanks > > Baoquan > > > > Good suggestion, it's good to change this function name too to avoid > any misleading. This patch hasn't got any other reviews recently, I'll > update it shortly. There's more. These two are doing the same thing: register_mem_pfn_is_ram register_oldmem_pfn_is_ram Need remove one of them and put it in a right place. Furthermore, may need see if there's existing function which is used to register a function to a hook. Secondly, exclude_from_vmcore() is not excluding anthing, it's only registering a function which is used to judge if oldmem/pfn is ram. Need rename it. Thanks Baoquan