From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: akpm@linux-foundation.org, benh@kernel.crashing.org,
paulus@samba.org, mpe@ellerman.id.au, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] mm: THP page cache support for ppc64
Date: Fri, 11 Nov 2016 17:42:11 +0530 [thread overview]
Message-ID: <8737iy1ahw.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161111101439.GB19382@node.shutemov.name>
"Kirill A. Shutemov" <kirill@shutemov.name> writes:
> On Mon, Nov 07, 2016 at 02:04:41PM +0530, Aneesh Kumar K.V wrote:
>> @@ -2953,6 +2966,13 @@ static int do_set_pmd(struct fault_env *fe, struct page *page)
>> ret = VM_FAULT_FALLBACK;
>> page = compound_head(page);
>>
>> + /*
>> + * Archs like ppc64 need additonal space to store information
>> + * related to pte entry. Use the preallocated table for that.
>> + */
>> + if (arch_needs_pgtable_deposit() && !fe->prealloc_pte)
>> + fe->prealloc_pte = pte_alloc_one(vma->vm_mm, fe->address);
>> +
>
> -ENOMEM handling?
How about
if (arch_needs_pgtable_deposit() && !fe->prealloc_pte) {
fe->prealloc_pte = pte_alloc_one(vma->vm_mm, fe->address);
if (!fe->prealloc_pte)
return VM_FAULT_OOM;
}
>
> I think we should do this way before this point. Maybe in do_fault() or
> something.
doing this in do_set_pmd keeps this closer to where we set the pmd. Any
reason you thing we should move it higher up the stack. We already do
pte_alloc() at the same level for a non transhuge case in
alloc_set_pte().
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: akpm@linux-foundation.org, benh@kernel.crashing.org,
paulus@samba.org, mpe@ellerman.id.au, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] mm: THP page cache support for ppc64
Date: Fri, 11 Nov 2016 17:42:11 +0530 [thread overview]
Message-ID: <8737iy1ahw.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161111101439.GB19382@node.shutemov.name>
"Kirill A. Shutemov" <kirill@shutemov.name> writes:
> On Mon, Nov 07, 2016 at 02:04:41PM +0530, Aneesh Kumar K.V wrote:
>> @@ -2953,6 +2966,13 @@ static int do_set_pmd(struct fault_env *fe, struct page *page)
>> ret = VM_FAULT_FALLBACK;
>> page = compound_head(page);
>>
>> + /*
>> + * Archs like ppc64 need additonal space to store information
>> + * related to pte entry. Use the preallocated table for that.
>> + */
>> + if (arch_needs_pgtable_deposit() && !fe->prealloc_pte)
>> + fe->prealloc_pte = pte_alloc_one(vma->vm_mm, fe->address);
>> +
>
> -ENOMEM handling?
How about
if (arch_needs_pgtable_deposit() && !fe->prealloc_pte) {
fe->prealloc_pte = pte_alloc_one(vma->vm_mm, fe->address);
if (!fe->prealloc_pte)
return VM_FAULT_OOM;
}
>
> I think we should do this way before this point. Maybe in do_fault() or
> something.
doing this in do_set_pmd keeps this closer to where we set the pmd. Any
reason you thing we should move it higher up the stack. We already do
pte_alloc() at the same level for a non transhuge case in
alloc_set_pte().
-aneesh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-11-11 12:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 8:34 [PATCH 1/2] mm: move vma_is_anonymous check within pmd_move_must_withdraw Aneesh Kumar K.V
2016-11-07 8:34 ` Aneesh Kumar K.V
2016-11-07 8:34 ` [PATCH 2/2] mm: THP page cache support for ppc64 Aneesh Kumar K.V
2016-11-07 8:34 ` Aneesh Kumar K.V
2016-11-11 10:14 ` Kirill A. Shutemov
2016-11-11 10:14 ` Kirill A. Shutemov
2016-11-11 12:12 ` Aneesh Kumar K.V [this message]
2016-11-11 12:12 ` Aneesh Kumar K.V
2016-11-11 16:29 ` Kirill A. Shutemov
2016-11-11 16:29 ` Kirill A. Shutemov
2016-11-12 1:37 ` Hugh Dickins
2016-11-12 1:37 ` Hugh Dickins
2016-11-07 8:57 ` [PATCH 1/2] mm: move vma_is_anonymous check within pmd_move_must_withdraw Hillf Danton
2016-11-07 8:57 ` Hillf Danton
2016-11-07 9:27 ` kbuild test robot
2016-11-07 9:27 ` kbuild test robot
2016-11-07 11:39 ` Aneesh Kumar K.V
2016-11-07 11:39 ` Aneesh Kumar K.V
2016-11-07 14:46 ` [PATCH V2] " Aneesh Kumar K.V
2016-11-07 14:46 ` Aneesh Kumar K.V
2016-11-11 10:06 ` Kirill A. Shutemov
2016-11-11 10:06 ` Kirill A. Shutemov
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=8737iy1ahw.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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 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.