All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Oscar Salvador <osalvador@techadventures.net>,
	Oscar Salvador <osalvador@suse.de>,
	Steven Sistare <steven.sistare@oracle.com>,
	Daniel Jordan <daniel.m.jordan@oracle.com>,
	Matthew Wilcox <willy@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	Huang Ying <ying.huang@intel.com>
Subject: Re: [PATCH v3] x86/e820: put !E820_TYPE_RAM regions into memblock.reserved
Date: Mon, 18 Jun 2018 16:36:16 -0700	[thread overview]
Message-ID: <20180618163616.52645949a8e4a0f73819fd62@linux-foundation.org> (raw)
In-Reply-To: <20180615140000.44tht4f3ek3lh2u2@xakep.localdomain>

On Fri, 15 Jun 2018 10:00:00 -0400 Pavel Tatashin <pasha.tatashin@oracle.com> wrote:

> > > Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> > > Tested-by: Oscar Salvador <osalvador@suse.de>
> > 
> > OK, this makes sense to me. It is definitely much better than the
> > original attempt.
> > 
> > Unless I am missing something this should be correct
> > Acked-by: Michal Hocko <mhocko@suse.com>
> 
> First of all thank you Naoya for finding and root causing this issue.
> 
> So, with this fix we reserve any hole and !E820_TYPE_RAM or
> !E820_TYPE_RESERVED_KERN in e820.  I think, this will work because we
> do pfn_valid() check in zero_resv_unavail(), so the ranges that do not have
> backing struct pages will be skipped. But, I am worried on the performance
> implications of when the holes of invalid memory are rather large. We would
> have to loop through it in zero_resv_unavail() one pfn at a time.
> 
> Therefore, we might also need to optimize zero_resv_unavail() a little like
> this:
> 
> 6407			if (!pfn_valid(ALIGN_DOWN(pfn, pageblock_nr_pages)))
> 6408				continue;
> 
> Add before "continue":
> 	pfn = ALIGN_DOWN(pfn, pageblock_nr_pages) + pageblock_nr_pageas - 1.
> At least, this way, we would skip a section of invalid memory at a time.
> 
> For the patch above:
> Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>
> 
> But, I think the 2nd patch with the optimization above should go along this
> this fix.

So I expect this patch needs a cc:stable, which I'll add.

The optimiation patch seems less important and I'd like to hold that
off for 4.19-rc1?


  parent reply	other threads:[~2018-06-18 23:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  0:54 kernel panic in reading /proc/kpageflags when enabling RAM-simulated PMEM Naoya Horiguchi
2018-06-05  1:18 ` Matthew Wilcox
2018-06-05  7:35   ` Naoya Horiguchi
2018-06-06  5:16     ` Naoya Horiguchi
2018-06-06  8:04       ` Oscar Salvador
2018-06-06  8:04         ` Oscar Salvador
2018-06-06  8:53         ` Oscar Salvador
2018-06-06  8:53           ` Oscar Salvador
2018-06-06  9:06           ` Naoya Horiguchi
2018-06-06  9:24             ` Naoya Horiguchi
2018-06-07  6:22               ` Naoya Horiguchi
2018-06-07  6:59                 ` Oscar Salvador
2018-06-07  6:59                   ` Oscar Salvador
2018-06-07  9:49                   ` Oscar Salvador
2018-06-07  9:49                     ` Oscar Salvador
2018-06-07 10:02                     ` Naoya Horiguchi
2018-06-11  9:05                       ` Naoya Horiguchi
2018-06-13  5:41                       ` [PATCH v1] mm: zero remaining unavailable struct pages (Re: kernel panic in reading /proc/kpageflags when enabling RAM-simulated PMEM) Naoya Horiguchi
2018-06-13  8:40                         ` Oscar Salvador
2018-06-14  4:56                           ` Naoya Horiguchi
2018-06-13  9:07                         ` Michal Hocko
2018-06-14  5:16                           ` Naoya Horiguchi
2018-06-14  5:38                             ` Oscar Salvador
2018-06-14  6:34                               ` [PATCH v2] x86/e820: put !E820_TYPE_RAM regions into memblock.reserved Naoya Horiguchi
2018-06-14  7:21                                 ` Oscar Salvador
2018-06-14 11:24                                   ` Oscar Salvador
2018-06-15  0:58                                     ` Naoya Horiguchi
2018-06-14 21:30                                 ` Oscar Salvador
2018-06-15  1:09                                   ` Naoya Horiguchi
2018-06-15  7:29                                     ` [PATCH v3] " Naoya Horiguchi
2018-06-15  8:41                                       ` Michal Hocko
2018-06-15 14:00                                         ` Pavel Tatashin
2018-06-15 14:10                                           ` Michal Hocko
2018-06-15 14:33                                           ` Oscar Salvador
2018-06-15 16:02                                             ` Pavel Tatashin
2018-06-18 23:36                                           ` Andrew Morton [this message]
2018-06-19  0:49                                             ` Pavel Tatashin
2018-07-02 20:05                                             ` Pavel Tatashin
2018-07-02 20:28                                               ` Andrew Morton
2018-07-02 20:31                                                 ` Pavel Tatashin
2018-06-14  7:00                             ` [PATCH v1] mm: zero remaining unavailable struct pages (Re: kernel panic in reading /proc/kpageflags when enabling RAM-simulated PMEM) Michal Hocko
2018-06-15  1:07                               ` Naoya Horiguchi
2018-06-15  8:39                                 ` Michal Hocko

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=20180618163616.52645949a8e4a0f73819fd62@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=daniel.m.jordan@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=osalvador@suse.de \
    --cc=osalvador@techadventures.net \
    --cc=pasha.tatashin@oracle.com \
    --cc=steven.sistare@oracle.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    /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.