Re: [PATCH] mm/gup: check page posion status for coredump.

2021-03-18 Thread David Hildenbrand
On 18.03.21 05:46, Matthew Wilcox wrote: On Wed, Mar 17, 2021 at 10:12:02AM +0100, David Hildenbrand wrote: + if (IS_ENABLED(CONFIG_MEMORY_FAILURE) && ret == 1) { + if (unlikely(PageHuge(page) && PageHWPoison(compound_head(page + ret = 0; +

Re: [PATCH] mm/gup: check page posion status for coredump.

2021-03-17 Thread Aili Yao
On Thu, 18 Mar 2021 04:46:00 + Matthew Wilcox wrote: > On Wed, Mar 17, 2021 at 10:12:02AM +0100, David Hildenbrand wrote: > > > + if (IS_ENABLED(CONFIG_MEMORY_FAILURE) && ret == 1) { > > > + if (unlikely(PageHuge(page) && > > > PageHWPoison(compound_head(page > > > +

Re: [PATCH] mm/gup: check page posion status for coredump.

2021-03-17 Thread Matthew Wilcox
On Wed, Mar 17, 2021 at 10:12:02AM +0100, David Hildenbrand wrote: > > + if (IS_ENABLED(CONFIG_MEMORY_FAILURE) && ret == 1) { > > + if (unlikely(PageHuge(page) && > > PageHWPoison(compound_head(page > > + ret = 0; > > + else if (unlikely(PageHWPoison(pag

Re: [PATCH] mm/gup: check page posion status for coredump.

2021-03-17 Thread Aili Yao
On Wed, 17 Mar 2021 10:12:02 +0100 David Hildenbrand wrote: > > I wonder if a simple > > if (PageHWPoison(compound_head(page))) > ret = 0; > > won't suffice. But I guess the "issue" is compound pages that are not > huge pages or transparent huge pages. Yes, the simple case won't suffic

Re: [PATCH] mm/gup: check page posion status for coredump.

2021-03-17 Thread David Hildenbrand
On 17.03.21 09:37, Aili Yao wrote: When we do coredump for user process signal, this may be an SIGBUS signal with BUS_MCEERR_AR or BUS_MCEERR_AO code, which means this signal is resulted from ECC memory fail like SRAR or SRAO, we expect the memory recovery work is finished correctly, then the get