All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Kairui Song <kasong@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	jbohac@suse.cz, adobriyan@gmail.com,
	Andrew Morton <akpm@linux-foundation.org>,
	osandov@fb.com, Bhupesh Sharma <bhsharma@redhat.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH v2] x86/gart/kcore: Exclude GART aperture from kcore
Date: Thu, 24 Jan 2019 10:17:44 +0800	[thread overview]
Message-ID: <20190124021744.GB19177@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CACPcB9faut+9p8oJ_4nUv6ZnQ42=N4b9vqjCFtbyrs1K1SCWvg@mail.gmail.com>

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

  reply	other threads:[~2019-01-24  2:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 10:54 [PATCH v2] x86/gart/kcore: Exclude GART aperture from kcore Kairui Song
2019-01-23 14:14 ` Baoquan He
2019-01-23 14:50   ` Kairui Song
2019-01-24  2:17     ` Baoquan He [this message]
2019-02-19  8:00       ` Kairui Song
2019-03-06  8:48         ` Kairui Song
2019-03-06  9:03           ` Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190124021744.GB19177@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhsharma@redhat.com \
    --cc=bp@alien8.de \
    --cc=dyoung@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jbohac@suse.cz \
    --cc=kasong@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=osandov@fb.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.