All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [Patch V2 2/2] sparc64 changes
Date: Fri, 25 Mar 2016 19:13:05 +0000	[thread overview]
Message-ID: <56F58DC1.1080609@oracle.com> (raw)
In-Reply-To: <1458772868-10255-3-git-send-email-dave.kleikamp@oracle.com>

On 03/25/2016 02:03 PM, David Miller wrote:
> From: Dave Kleikamp <dave.kleikamp@oracle.com>
> Date: Fri, 25 Mar 2016 13:22:30 -0500
> 
>> On 03/24/2016 02:22 PM, David Miller wrote:
>>> From: Dave Kleikamp <dave.kleikamp@oracle.com>
>>> Date: Wed, 23 Mar 2016 17:41:08 -0500
>>>
>>>> +	/* Check for a huge/THP page */
>>>> +	paddr = pmd_is_huge(pte, vaddr, verbose);
>>>> +	if (paddr)
>>>> +		goto out;
>>>  ...
>>>> +	paddr = pte_to_pa(pte);
>>>> +	paddr = paddr | (vaddr & ~PAGE_MASK);
>>>
>>> This handles transparent huge pages installed at the PMD level, but I don't
>>> see that it handles huge PTEs properly, which are encoded at the PTE level.
>>
>> I've been looking at the huge page code again and I'm not sure what I'm
>> missing. Isn't there still a huge PTE in the page table for every 8K
>> page with the proper physical address bits?
> 
> Yes there is a huge PTE encoded every 8K, but I'm wondering about the
> address masking et al. you are doing here...

I'm pretty sure it works. In set_huge_pte_at():

        for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
                set_pte_at(mm, addr, ptep, entry);
                ptep++;
                addr += PAGE_SIZE;
                pte_val(entry) += PAGE_SIZE;
        }

Each pte correctly addresses an 8K page. The crash code doesn't really
need to know it's part of a huge page.

  parent reply	other threads:[~2016-03-25 19:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 22:41 [Patch V2 2/2] sparc64 changes Dave Kleikamp
2016-03-24 19:22 ` David Miller
2016-03-25 18:22 ` Dave Kleikamp
2016-03-25 19:03 ` David Miller
2016-03-25 19:13 ` Dave Kleikamp [this message]
2016-03-25 19:19 ` Sam Ravnborg
2016-03-25 19:35 ` David Miller
2016-03-28 20:34 ` Dave Kleikamp

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=56F58DC1.1080609@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=sparclinux@vger.kernel.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.