linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Raslan, KarimAllah" <karahmed@amazon.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vlastimil Babka <vbabka@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Yaowei Bai <baiyaowei@cmss.chinamobile.com>,
	Joe Perches <joe@perches.com>, Tejun Heo <tj@kernel.org>,
	"Liguori, Anthony" <aliguori@amazon.com>,
	"Schoenherr, Jan H." <jschoenh@amazon.de>
Subject: Re: [PATCH] sparse: Track the boundaries of memory sections for accurate checks
Date: Wed, 14 Sep 2016 22:11:00 +0000	[thread overview]
Message-ID: <7D63A80D-53B7-460A-A74D-0005B7D499D6@amazon.de> (raw)
In-Reply-To: <CAPcyv4gQZ-=6SdsGc-YafcAUz0WWxtGuh56CPan1xqSkWbd9=A@mail.gmail.com>


Ahmed, Karim Allah
karahmed@amazon.de



> On Sep 15, 2016, at 12:05 AM, Dan Williams <dan.j.williams@intel.com> wrote:
> 
> On Wed, Sep 14, 2016 at 2:40 PM, Raslan, KarimAllah <karahmed@amazon.de> wrote:
>> 
>> 
>> On 6/20/16, 10:23 AM, "Michal Hocko" <mhocko@kernel.org> wrote:
>> 
>>    On Sat 18-06-16 12:11:19, KarimAllah Ahmed wrote:
>>> When sparse memory model is used an array of memory sections is created to
>>> track each block of contiguous physical pages. Each element of this array
>>> contains PAGES_PER_SECTION pages. During the creation of this array the actual
>>> boundaries of the memory block is lost, so the whole block is either considered
>>> as present or not.
>>> 
>>> pfn_valid() in the sparse memory configuration checks which memory sections the
>>> pfn belongs to then checks whether it's present or not. This yields sub-optimal
>>> results when the available memory doesn't cover the whole memory section,
>>> because pfn_valid will return 'true' even for the unavailable pfns at the
>>> boundaries of the memory section.
>> 
>>    Please be more verbose of _why_ the patch is needed. Why those
>>    "sub-optimal results" matter?
>> 
>> Does this make sense to you ?
> 
> [ channeling my inner akpm ]
> 
> What's the user visible effect of this change?  What code is getting
> tripped up by pfn_valid() being imprecise, and why is changing
> pfn_valid() the preferred fix?

I did expand the commit message in v2 of this patch to answer these questions:

https://patchwork.kernel.org/patch/9190737/

Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B

  reply	other threads:[~2016-09-14 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 10:11 [PATCH] sparse: Track the boundaries of memory sections for accurate checks KarimAllah Ahmed
2016-06-20  8:23 ` Michal Hocko
2016-06-21 14:33   ` [PATCH v2] " KarimAllah Ahmed
2016-09-14 21:40   ` [PATCH] " Raslan, KarimAllah
2016-09-14 22:05     ` Dan Williams
2016-09-14 22:11       ` Raslan, KarimAllah [this message]
2016-09-14 22:53         ` Dan Williams

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=7D63A80D-53B7-460A-A74D-0005B7D499D6@amazon.de \
    --to=karahmed@amazon.de \
    --cc=akpm@linux-foundation.org \
    --cc=aliguori@amazon.com \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=dan.j.williams@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=joe@perches.com \
    --cc=jschoenh@amazon.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=tj@kernel.org \
    --cc=vbabka@suse.cz \
    /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).