From: Mike Kravetz <mike.kravetz@oracle.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Andrew Morton <akpm@linux-foundation.org>,
Punit Agrawal <punit.agrawal@arm.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Michal Hocko <mhocko@kernel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage
Date: Tue, 13 Feb 2018 14:33:33 -0800 [thread overview]
Message-ID: <e673f38a-9e5f-21f6-421b-b3cb4ff02e91@oracle.com> (raw)
In-Reply-To: <87wozhvc49.fsf@concordia.ellerman.id.au>
On 02/12/2018 06:48 PM, Michael Ellerman wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
>
>> On Thu, 08 Feb 2018 12:30:45 +0000 Punit Agrawal <punit.agrawal@arm.com> wrote:
>>
>>>>
>>>> So I don't think that the above test result means that errors are properly
>>>> handled, and the proposed patch should help for arm64.
>>>
>>> Although, the deviation of pud_huge() avoids a kernel crash the code
>>> would be easier to maintain and reason about if arm64 helpers are
>>> consistent with expectations by core code.
>>>
>>> I'll look to update the arm64 helpers once this patch gets merged. But
>>> it would be helpful if there was a clear expression of semantics for
>>> pud_huge() for various cases. Is there any version that can be used as
>>> reference?
>>
>> Is that an ack or tested-by?
>>
>> Mike keeps plaintively asking the powerpc developers to take a look,
>> but they remain steadfastly in hiding.
>
> Cc'ing linuxppc-dev is always a good idea :)
>
Thanks Michael,
I was mostly concerned about use cases for soft/hard offline of huge pages
larger than PMD_SIZE on powerpc. I know that powerpc supports PGD_SIZE
huge pages, and soft/hard offline support was specifically added for this.
See, 94310cbcaa3c "mm/madvise: enable (soft|hard) offline of HugeTLB pages
at PGD level"
This patch will disable that functionality. So, at a minimum this is a
'heads up'. If there are actual use cases that depend on this, then more
work/discussions will need to happen. From the e-mail thread on PGD_SIZE
support, I can not tell if there is a real use case or this is just a
'nice to have'.
--
Mike Kravetz
>> Folks, this patch fixes a BUG and is marked for -stable. Can we please
>> prioritize it?
>
> It's not crashing for me (on 4.16-rc1):
>
> # ./huge-poison
> Poisoning page...once
> Poisoning page...once again
> madvise: Bad address
>
> And I guess the above is the expected behaviour?
>
> Looking at the function trace it looks like the 2nd madvise is going
> down reasonable code paths, but I don't know for sure:
>
> 8) | SyS_madvise() {
> 8) | capable() {
> 8) | ns_capable_common() {
> 8) 0.094 us | cap_capable();
> 8) 0.516 us | }
> 8) 1.052 us | }
> 8) | get_user_pages_fast() {
> 8) 0.354 us | gup_pgd_range();
> 8) | get_user_pages_unlocked() {
> 8) 0.050 us | down_read();
> 8) | __get_user_pages() {
> 8) | find_extend_vma() {
> 8) | find_vma() {
> 8) 0.148 us | vmacache_find();
> 8) 0.622 us | }
> 8) 1.064 us | }
> 8) 0.028 us | arch_vma_access_permitted();
> 8) | follow_hugetlb_page() {
> 8) | huge_pte_offset() {
> 8) 0.128 us | __find_linux_pte();
> 8) 0.580 us | }
> 8) 0.048 us | _raw_spin_lock();
> 8) | hugetlb_fault() {
> 8) | huge_pte_offset() {
> 8) 0.034 us | __find_linux_pte();
> 8) 0.434 us | }
> 8) 0.028 us | is_hugetlb_entry_migration();
> 8) 0.032 us | is_hugetlb_entry_hwpoisoned();
> 8) 2.118 us | }
> 8) 4.940 us | }
> 8) 7.468 us | }
> 8) 0.056 us | up_read();
> 8) 8.722 us | }
> 8) + 10.264 us | }
> 8) + 12.212 us | }
>
>
> cheers
>
> --
> 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>
>
--
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:[~2018-02-13 22:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1517207283-15769-1-git-send-email-n-horiguchi@ah.jp.nec.com>
2018-01-29 6:30 ` [PATCH v1] " Naoya Horiguchi
2018-01-29 9:54 ` Michal Hocko
2018-01-29 18:08 ` Mike Kravetz
2018-01-30 1:39 ` Naoya Horiguchi
2018-01-30 3:54 ` [PATCH v2] " Naoya Horiguchi
2018-01-30 23:56 ` Mike Kravetz
2018-02-05 15:05 ` Punit Agrawal
2018-02-07 1:14 ` Naoya Horiguchi
2018-02-08 12:30 ` Punit Agrawal
2018-02-08 20:17 ` Andrew Morton
2018-02-09 11:06 ` Punit Agrawal
2018-02-13 2:48 ` Michael Ellerman
2018-02-13 22:33 ` Mike Kravetz [this message]
2019-05-28 9:49 ` Wanpeng Li
2019-05-29 23:31 ` Mike Kravetz
2019-06-10 23:50 ` Naoya Horiguchi
2019-06-11 8:42 ` Wanpeng Li
2019-08-20 7:03 ` Wanpeng Li
2019-08-21 5:39 ` ##freemail## " Naoya Horiguchi
2019-08-21 7:15 ` Wanpeng Li
2018-02-09 1:17 ` Naoya Horiguchi
2018-02-13 19:01 ` Punit Agrawal
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=e673f38a-9e5f-21f6-421b-b3cb4ff02e91@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhocko@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=punit.agrawal@arm.com \
/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