linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver <oohall@gmail.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/2] mm/pmem: Add memblock based e820 platform driver
Date: Sat, 7 Jul 2018 17:15:08 +1000	[thread overview]
Message-ID: <CAOSf1CFuxga8BAbnvPdZvutgpAxmzgjiqxzHFuVTVLOkMwKO+A@mail.gmail.com> (raw)
In-Reply-To: <CAPcyv4gjrsswcakSog7jxT+agH7NrBEvwxe9jT0ycU3RZV5sWA@mail.gmail.com>

On Sat, Jul 7, 2018 at 5:38 AM, Dan Williams <dan.j.williams@intel.com> wrote:
> On Fri, Jul 6, 2018 at 1:29 AM, Aneesh Kumar K.V
> <aneesh.kumar@linux.ibm.com> wrote:
>> This patch steal system RAM and use that to emulate pmem device using the
>> e820 platform driver.
>>
>> This adds a new kernel command line 'pmemmap' which takes the format <size[KMG]>
>> to allocate memory early in the boot. This memory is later registered as
>> persistent memory range.
>>
>> Based on original patch from Oliver OHalloran <oliveroh@au1.ibm.com>
>>
>> Not-Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>  drivers/nvdimm/Kconfig        |  13 ++++
>>  drivers/nvdimm/Makefile       |   1 +
>>  drivers/nvdimm/memblockpmem.c | 115 ++++++++++++++++++++++++++++++++++
>>  3 files changed, 129 insertions(+)
>>  create mode 100644 drivers/nvdimm/memblockpmem.c
>>
> [..]
>> +/*
>> + * pmemmap=ss[KMG]
>> + *
>> + * This is similar to the memremap=offset[KMG]!size[KMG] paramater
>> + * for adding a legacy pmem range to the e820 map on x86, but it's
>> + * platform agnostic.

> The current memmap=ss!nn option is a non-stop source of bugs and
> fragility. The fact that this lets the kernel specify the base address
> helps, but then this is purely just a debug facility because
> memmap=ss!nn is there to cover platform firmware implementations that
> fail to mark a given address range as persistent.

> If this is just for debug, why not use qemu?

To make a long story short, we have two virtualisation stacks and only one of
them is based on qemu. An unfortunately large chunk of our customers (and
our internal test systems) run the other one so we need to accommodate them
somehow.

> If this is not for debug what are these systems that don't have proper firmware
> support?

I wrote the original version (for RHEL 7.something) for a customer who wanted
to do some testing which needed to be run on real hardware for some reason.
We couldn't install a FW update on their system so this ended up being the least
painful way to get them going. That's not a strong argument for
merging this, but
the point is that it's sometimes useful to have the capability in the kernel.

Oliver

  reply	other threads:[~2018-07-07  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06  8:29 [RFC PATCH 1/2] mm/nvidmm: Drop x86 dependency on nvdimm e820 device Aneesh Kumar K.V
2018-07-06  8:29 ` [RFC PATCH 2/2] mm/pmem: Add memblock based e820 platform driver Aneesh Kumar K.V
2018-07-06 18:46   ` Randy Dunlap
2018-07-06 19:38   ` Dan Williams
2018-07-07  7:15     ` Oliver [this message]
2018-07-07 17:36       ` Dan Williams
2018-07-09  5:17         ` Aneesh Kumar K.V
2018-07-09  6:06           ` Dan Williams
2018-07-07  7:50   ` Oliver
2018-07-09  5:16     ` Aneesh Kumar K.V

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=CAOSf1CFuxga8BAbnvPdZvutgpAxmzgjiqxzHFuVTVLOkMwKO+A@mail.gmail.com \
    --to=oohall@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).