Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602225 > unrolled thread

Re: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock when spliting large pages

Started byPaolo Bonzini <pbonzini@redhat.com>
First post2017-03-16 13:30 +0100
Last post2017-03-16 13:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock  when spliting large pages Paolo Bonzini <pbonzini@redhat.com> - 2017-03-16 13:30 +0100

#1602225 — Re: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock when spliting large pages

FromPaolo Bonzini <pbonzini@redhat.com>
Date2017-03-16 13:30 +0100
SubjectRe: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock when spliting large pages
Message-ID<tlCHw-6I6-23@gated-at.bofh.it>

On 02/03/2017 16:15, Brijesh Singh wrote:
> 
>  __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
> -		   struct page *base)
> +		  pte_t *pbase, unsigned long new_pfn)
>  {
> -	pte_t *pbase = (pte_t *)page_address(base);

Just one comment and I'll reply to Boris, I think you can compute pbase 
with pfn_to_kaddr, and avoid adding a new argument.

>  	 */
> -	__set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE)));
> +	__set_pmd_pte(kpte, address,
> +		native_make_pte((new_pfn << PAGE_SHIFT) + _KERNPG_TABLE));

And this probably is better written as:

	__set_pmd_pte(kpte, address, pfn_pte(new_pfn, __pgprot(_KERNPG_TABLE));

Paolo

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web