All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <boaz@plexistor.com>
To: Christoph Hellwig <hch@lst.de>, Boaz Harrosh <boaz@plexistor.com>
Cc: linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk,
	ross.zwisler@linux.intel.com
Subject: Re: [PATCH] SQUASHME: Fixes to e820 handling of pmem
Date: Thu, 02 Apr 2015 14:20:47 +0300	[thread overview]
Message-ID: <551D260F.4080601@plexistor.com> (raw)
In-Reply-To: <20150402093037.GA14209@lst.de>

On 04/02/2015 12:30 PM, Christoph Hellwig wrote:
> On Wed, Apr 01, 2015 at 05:25:22PM +0300, Boaz Harrosh wrote:
>>  		pfn = PFN_DOWN(ei->addr + ei->size);
>>  
>> -		switch (ei->type) {
>> -		case E820_RAM:
>> -		case E820_PRAM:
>> -		case E820_RESERVED_KERN:
>> -			break;
>> -		default:
>> +		if (ei->type != E820_RAM && ei->type != E820_RESERVED_KERN)
>>  			register_nosave_region(PFN_UP(ei->addr), pfn);
>> -		}
> 
> I guess this makes sense - if the content is persistent already we don't need
> to save it.
> 

Yes

>> -		if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) {
>> -			if (e820.map[i].type != E820_PRAM)
>> -				res->flags |= IORESOURCE_BUSY;
>> +		if (((e820.map[i].type != E820_RESERVED) &&
>> +		     (e820.map[i].type != E820_PRAM)) ||
>> +		     res->start < (1ULL<<20)) {
> 
> So now we also trigger for PRAM regions under 1ULL<<20, was that the
> intentional change?  Honestly I don't really understand this 1ULL<<20
> magic here even for the existing case.  Guess this is magic from the
> old ISA PC days?  
> 

OK so by now I have had a chance to test all cases and figure out
what happened. I was running on your V1 and then V2. And had huge
problems with NUMA. The thing that actually fixed everything and
brought the system back to life, was already in your V3.

It was the remove of reserve_pmem() and the call to memblock_reserve()
and init_memory_mapping() from within. It was making a mess.

So your V3 was already running nice. But I already fixed everything
on my side by the time you sent V3, and what I sent here is the
diff from what I had and your V3.

But these are all good fixes still. (Though not fatal as V2 was)

3 small fixes here:
* Adding back the memmap=! now that everything works perfectly
  as expected.

* The one above that fixes register_nosave_region

and ...
>> +			res->flags |= IORESOURCE_BUSY;
> 
> Guess this is the real change, and I'd love to understand why this
> makes a difference for you.  IORESOURCE_BUSY is checked almost never,
> and is intented to mean it's a driver mapping.

This here is a very minor thing. I have lots of experience with this
code and with the internals of insert_resource() from my old e820.c
fixes (Which are BTW still relevant but no longer needed for any
current platform)

So what happens here is just the adding of the IORESOURCE_BUSY flag.
Actually all these resources are already in the resource list and this
code is just changing the flag. So if you are not changing the flag there
is just no point in calling insert_resource(). It will change nothing.

>From what I understand from the history of this file and from prints
that I put in this file and at the resource manager. The logic is that
it wants to make all E820_XXX busy so to not let any driver try and claim them.
And Also the code does not want to allow any kind of e820 resource below the 1M
be allowed for drivers, reserved or otherwise.

Any E820_RESERVED regions it allows for driver use by not setting IORESOURCE_BUSY.

Your code and mine are effectively the same only that I optimize out the call to
insert_resource() since the flags were not changed.

Testing status:
We had some birth problems with the new system and the APIs that changed so the
testing rig broke half through the night. But we have wrinkled out the last
problems and the machines are pumping away full steam, NUMA and everything.
So far it looks good. I will very soon now, Send you a tested-by: That
confirms these patches are just as good as what we had until now out-of-tree.
(I'm running with my page-struct patches on top of your pmem driver. Will publish
 trees soon)

Thank you for your patience
Boaz


  parent reply	other threads:[~2015-04-02 11:20 UTC|newest]

Thread overview: 50+ 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 [this message]
2015-04-02 12:31   ` [tip:x86/pmem] x86/mm: Add support for the non-standard protected e820 type tip-bot for Christoph Hellwig
2015-04-02 19:08     ` Andy Lutomirski
2015-04-02 19:13       ` Ingo Molnar
2015-04-02 19:51         ` Andy Lutomirski
2015-04-16 22:31           ` Andy Lutomirski
2015-04-17  0:55             ` Elliott, Robert (Server Storage)
2015-04-17  0:59               ` Andy Lutomirski
2015-04-02 20:28     ` Yinghai Lu
2015-04-02 20:23   ` [PATCH 1/2] x86: add " 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
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 12:31   ` [tip:x86/pmem] drivers/block/pmem: Add " tip-bot for Ross Zwisler
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=551D260F.4080601@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=ross.zwisler@linux.intel.com \
    --cc=x86@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 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.