linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: 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>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	"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 13:48:06 +1100	[thread overview]
Message-ID: <87wozhvc49.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20180208121749.0ac09af2b5a143106f339f55@linux-foundation.org>

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 :)

> 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

       reply	other threads:[~2018-02-13  2:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180130013919.GA19959@hori1.linux.bs1.fc.nec.co.jp>
     [not found] ` <1517284444-18149-1-git-send-email-n-horiguchi@ah.jp.nec.com>
     [not found]   ` <87inbbjx2w.fsf@e105922-lin.cambridge.arm.com>
     [not found]     ` <20180207011455.GA15214@hori1.linux.bs1.fc.nec.co.jp>
     [not found]       ` <87fu6bfytm.fsf@e105922-lin.cambridge.arm.com>
     [not found]         ` <20180208121749.0ac09af2b5a143106f339f55@linux-foundation.org>
2018-02-13  2:48           ` Michael Ellerman [this message]
2018-02-13 22:33             ` [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage Mike Kravetz
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

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=87wozhvc49.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --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=mike.kravetz@oracle.com \
    --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;
as well as URLs for NNTP newsgroup(s).