[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YEnZ0lR/sycBrRIn@dhcp22.suse.cz>
Date: Thu, 11 Mar 2021 09:50:26 +0100
From: Michal Hocko <mhocko@...e.com>
To: Muchun Song <songmuchun@...edance.com>
Cc: Jonathan Corbet <corbet@....net>,
Mike Kravetz <mike.kravetz@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, bp@...en8.de, x86@...nel.org,
hpa@...or.com, dave.hansen@...ux.intel.com, luto@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>, paulmck@...nel.org,
mchehab+huawei@...nel.org, pawan.kumar.gupta@...ux.intel.com,
Randy Dunlap <rdunlap@...radead.org>, oneukum@...e.com,
anshuman.khandual@....com, jroedel@...e.de,
Mina Almasry <almasrymina@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
Oscar Salvador <osalvador@...e.de>,
"Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>,
David Hildenbrand <david@...hat.com>,
HORIGUCHI NAOYA(堀口 直也)
<naoya.horiguchi@....com>,
Joao Martins <joao.m.martins@...cle.com>,
Xiongchun duan <duanxiongchun@...edance.com>,
linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Chen Huang <chenhuang5@...wei.com>,
Bodeddula Balasubramaniam <bodeddub@...zon.com>
Subject: Re: [External] Re: [PATCH v18 5/9] mm: hugetlb: set the PageHWPoison
to the raw error page
On Thu 11-03-21 14:34:04, Muchun Song wrote:
> On Wed, Mar 10, 2021 at 11:28 PM Michal Hocko <mhocko@...e.com> wrote:
> >
> > On Mon 08-03-21 18:28:03, Muchun Song wrote:
> > > Because we reuse the first tail vmemmap page frame and remap it
> > > with read-only, we cannot set the PageHWPosion on some tail pages.
> > > So we can use the head[4].private (There are at least 128 struct
> > > page structures associated with the optimized HugeTLB page, so
> > > using head[4].private is safe) to record the real error page index
> > > and set the raw error page PageHWPoison later.
> >
> > Can we have more poisoned tail pages? Also who does consume that index
> > and set the HWPoison on the proper tail page?
>
> Good point. I look at the routine of memory failure closely.
> If we do not clear the HWPoison of the head page, we cannot
> poison another tail page.
>
> So we should not set the destructor of the huge page from
> HUGETLB_PAGE_DTOR to NULL_COMPOUND_DTOR
> before calling alloc_huge_page_vmemmap(). In this case,
> the below check of PageHuge() always returns true.
>
> I need to fix this in the previous patch.
>
> memory_failure()
> if (PageHuge(page))
> memory_failure_hugetlb()
> head = compound_head(page)
> if (TestSetPageHWPoison(head))
> return
I have to say that I am not fully familiar with hwpoisoning code
(especially after recent changes) but IIRC it does rely on hugetlb page
dissolving. With the new code this operation can fail which is a new
situation. Unless I am misunderstanding this can lead to a lost memory
failure operation on other tail pages.
Anyway the above answers the question why a single slot is sufficient so
it would be great to mention that in a changelog along with the caveat
that some pages might miss their poisoning.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists