LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Christophe LEROY <christophe.leroy@c-s.fr>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Scott Wood <oss@buserror.net>,
	Nicholas Piggin <npiggin@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/3] powerpc/32: Fix hugepage allocation on 8xx at hint address
Date: Tue, 16 Jan 2018 22:13:39 +0530	[thread overview]
Message-ID: <cc2106e9-6ba1-e937-3e19-99572fa014d2@linux.vnet.ibm.com> (raw)
In-Reply-To: <b5e34a5b-94b8-9405-929d-d35dde3fcb3b@c-s.fr>



On 01/16/2018 10:01 PM, Christophe LEROY wrote:
> 
> 
> Le 16/01/2018 à 16:49, Aneesh Kumar K.V a écrit :
>> Christophe Leroy <christophe.leroy@c-s.fr> writes:
>>
>>> When an app has some regular pages allocated (e.g. see below) and tries
>>> to mmap() a huge page at a hint address covered by the same PMD entry,
>>> the kernel accepts the hint allthough the 8xx cannot handle different
>>> page sizes in the same PMD entry.
>>
>>
>> So that is a bug in get_unmapped_area function that you are using and
>> you want to fix that by using the slice code. Can you describe here what
>> the allocation restrictions are w.r.t 8xx? Do they have segments and
>> base page size like hash64?
> 
> I don't think it is a bug in get_unmapped_area() that is used by 
> default. It is that some HW do support mixing any page size in the same 
> page table (eg BOOK3E ?), but the 8xx doesn't.
> In the 8xx, the page size is defined in the PGD entry, then all pages 
> defined in a given page table pointed by a PGD entry have the same size.
> 
> So it is similar to segments if you consider each PGD entry as a kind of 
> segment
> 

so IIUC, hugepd format encodes the page size details and that require us 
to ensure that all the address range mapped at that hupge_pd entry is of 
same page size? Hence we want to avoid mmap handing over an address in 
that range when we already have a hugetlb mapping in that range?


-aneesh

  parent reply	other threads:[~2018-01-16 16:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 16:44 [PATCH 1/3] powerpc/32: Fix hugepage allocation on 8xx at hint address Christophe Leroy
2018-01-05 16:44 ` [PATCH 2/3] powerpc/mm: Allow more than 16 low slices Christophe Leroy
2018-01-16 15:52   ` Aneesh Kumar K.V
2018-01-16 16:37     ` Christophe LEROY
2018-01-05 16:44 ` [PATCH 3/3] powerpc/8xx: Increase the number of mm slices Christophe Leroy
2018-01-16 15:53   ` Aneesh Kumar K.V
2018-01-16 16:16     ` Christophe LEROY
2018-01-16 15:49 ` [PATCH 1/3] powerpc/32: Fix hugepage allocation on 8xx at hint address Aneesh Kumar K.V
2018-01-16 16:31   ` Christophe LEROY
2018-01-16 16:41     ` Aneesh Kumar K.V
2018-01-16 16:57       ` Christophe LEROY
2018-01-17  5:23         ` Aneesh Kumar K.V
2018-01-17  9:47           ` Christophe LEROY
2018-01-16 16:43     ` Aneesh Kumar K.V [this message]
2018-01-16 16:53       ` Christophe LEROY

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=cc2106e9-6ba1-e937-3e19-99572fa014d2@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=oss@buserror.net \
    --cc=paulus@samba.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