From: Boaz Harrosh <boaz@plexistor.com>
To: Yinghai Lu <yinghai@kernel.org>, Toshi Kani <toshi.kani@hp.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-nvdimm@ml01.01.org,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [Linux-nvdimm] [PATCH 1/2] x86: add support for the non-standard protected e820 type
Date: Sun, 05 Apr 2015 12:18:03 +0300 [thread overview]
Message-ID: <5520FDCB.80505@plexistor.com> (raw)
In-Reply-To: <CAE9FiQXg0DZ3oCGmPk+qubwQ_=9LLMrZTJqN6HPn0t+5Vs8+Jg@mail.gmail.com>
On 04/03/2015 08:12 PM, Yinghai Lu wrote:
> On Fri, Apr 3, 2015 at 9:14 AM, Toshi Kani <toshi.kani@hp.com> wrote:
>> On Wed, 2015-04-01 at 09:12 +0200, Christoph Hellwig wrote:
>> :
>>> @@ -748,7 +758,7 @@ u64 __init early_reserve_e820(u64 size, u64 align)
>>> /*
>>> * Find the highest page frame number we have available
>>> */
>>> -static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
>>> +static unsigned long __init e820_end_pfn(unsigned long limit_pfn)
>>> {
>>> int i;
>>> unsigned long last_pfn = 0;
>>> @@ -759,7 +769,11 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
>>> unsigned long start_pfn;
>>> unsigned long end_pfn;
>>>
>>> - if (ei->type != type)
>>> + /*
>>> + * Persistent memory is accounted as ram for purposes of
>>> + * establishing max_pfn and mem_map.
>>> + */
>>> + if (ei->type != E820_RAM && ei->type != E820_PRAM)
>>> continue;
>>
>> Should we also delete this code, accounting E820_PRAM as ram, along with
>> the deletion of reserve_pmem() in this version?
>
Hi Yinghai, Toshi
In my old patches I did not have these updates as well, and everything
was very much usable, for a long time.
However. I actually liked these changes in Christoph's patches and
thought they should stay, here is why.
Today I will be sending patches to make pmem be supported with
page-struct as an optional alternative to the use of ioremap.
This is for advanced users that wants to RDMA direct_IO and so
on directly out of pmem.
At one point we had a BUG in some mm/memory.c code that was checking max_pfn.
Actually that was a bug and we do not go through this code anymore. And between
us that global variable max_pfn is a bad hack. But I kind of like to have it as
long as it is used. So code that wants to protect by max_pfn can still accept
pmem memory submitted to it.
I have tried to audit the Kernel use of max_pfn and I do not see how
this can hurt? I do see were it would theoretically help.
Think of a system that looks like this as a memory map:
1. VM (Volitile mem)
2. PM
3. VM
4. PM
Which is what is returned by current and planned NUMA implementations.
So pmem region-2 will be covered by max_pfn. But pmem region 4 will not.
If any code checks for max_pfn it will be OK with pmem-2 but *not* with
pmem-4. This is highly unexpected.
I think the all max_pfn should be killed ASAP, but until it is then
it will not hurt for pmem to be covered.
Thanks
Boaz
next prev parent reply other threads:[~2015-04-05 9:18 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 7:12 another pmem variant V3 Christoph Hellwig
2015-04-01 7:12 ` [PATCH 1/2] x86: add support for the non-standard protected e820 type Christoph Hellwig
2015-04-01 14:25 ` [PATCH] SQUASHME: Fixes to e820 handling of pmem Boaz Harrosh
2015-04-02 9:30 ` Christoph Hellwig
2015-04-02 9:37 ` Ingo Molnar
2015-04-02 9:40 ` Christoph Hellwig
2015-04-02 11:18 ` Christoph Hellwig
2015-04-02 11:20 ` Boaz Harrosh
2015-04-02 20:23 ` [PATCH 1/2] x86: add support for the non-standard protected e820 type Yinghai Lu
2015-04-03 16:14 ` [Linux-nvdimm] " Toshi Kani
2015-04-03 17:12 ` Yinghai Lu
2015-04-03 20:54 ` Toshi Kani
2015-04-04 9:40 ` Ingo Molnar
2015-04-05 7:44 ` Yinghai Lu
2015-04-06 7:27 ` Ingo Molnar
2015-04-06 17:29 ` Toshi Kani
2015-04-06 18:26 ` Yinghai Lu
2015-04-06 18:23 ` Toshi Kani
2015-04-05 9:18 ` Boaz Harrosh [this message]
2015-04-05 20:06 ` Yinghai Lu
2015-04-06 7:16 ` Boaz Harrosh
2015-04-06 15:55 ` Christoph Hellwig
2015-04-01 7:12 ` [PATCH 2/2] pmem: add a driver for persistent memory Christoph Hellwig
2015-04-01 15:18 ` Boaz Harrosh
2015-04-02 9:32 ` Christoph Hellwig
2015-04-02 15:31 ` [PATCH] pmem: Add prints at module load and unload Boaz Harrosh
2015-04-02 15:39 ` [Linux-nvdimm] " Dan Williams
2015-04-02 15:47 ` Boaz Harrosh
2015-04-02 16:01 ` Dan Williams
2015-04-02 16:44 ` Christoph Hellwig
2015-04-05 8:50 ` Boaz Harrosh
2015-04-07 15:19 ` Christoph Hellwig
2015-04-07 15:34 ` Boaz Harrosh
2015-04-07 15:46 ` [PATCH A+B] " Boaz Harrosh
2015-04-07 15:47 ` [PATCH 1A] pmem: Add prints at pmem_probe/remove Boaz Harrosh
2015-04-07 15:47 ` [PATCH 1B] pmem: Add prints at module load and unload Boaz Harrosh
2015-04-13 9:05 ` [PATCH A+B] " Greg KH
2015-04-13 12:05 ` Boaz Harrosh
2015-04-13 12:36 ` Greg KH
2015-04-13 13:20 ` Boaz Harrosh
2015-04-13 13:36 ` Greg KH
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=5520FDCB.80505@plexistor.com \
--to=boaz@plexistor.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=toshi.kani@hp.com \
--cc=x86@kernel.org \
--cc=yinghai@kernel.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).