From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f72.google.com (mail-vk0-f72.google.com [209.85.213.72]) by kanga.kvack.org (Postfix) with ESMTP id 4F7D26B0270 for ; Wed, 20 Apr 2016 06:55:40 -0400 (EDT) Received: by mail-vk0-f72.google.com with SMTP id e185so83917945vkb.2 for ; Wed, 20 Apr 2016 03:55:40 -0700 (PDT) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com. [58.251.152.64]) by mx.google.com with ESMTP id q66si4129622qgd.93.2016.04.20.03.55.37 for ; Wed, 20 Apr 2016 03:55:39 -0700 (PDT) Message-ID: <57175F30.6050300@huawei.com> Date: Wed, 20 Apr 2016 18:51:28 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: Re: mce: a question about memory_failure_early_kill in memory_failure() References: <571612DE.8020908@huawei.com> <20160420070735.GA10125@hori1.linux.bs1.fc.nec.co.jp> In-Reply-To: <20160420070735.GA10125@hori1.linux.bs1.fc.nec.co.jp> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Naoya Horiguchi Cc: Linux MM , LKML On 2016/4/20 15:07, Naoya Horiguchi wrote: > On Tue, Apr 19, 2016 at 07:13:34PM +0800, Xishi Qiu wrote: >> /proc/sys/vm/memory_failure_early_kill >> >> 1: means kill all processes that have the corrupted and not reloadable page mapped. >> 0: means only unmap the corrupted page from all processes and only kill a process >> who tries to access it. >> >> If set memory_failure_early_kill to 0, and memory_failure() has been called. >> memory_failure() >> hwpoison_user_mappings() >> collect_procs() // the task(with no PF_MCE_PROCESS flag) is not in the tokill list >> try_to_unmap() >> >> If the task access the memory, there will be a page fault, >> so the task can not access the original page again, right? > > Yes, right. That's the behavior in default "late kill" case. > Hi Naoya, Thanks for your reply, my confusion is that after try_to_unmap(), there will be a page fault if the task access the memory, and we will alloc a new page for it. So how the hardware(mce) know this page fault is relate to the poisioned page which is unmapped from the task? Will we record something in pte when after try_to_unmap() in memory_failure()? Thanks, Xishi Qiu > I'm guessing that you might have a more specific problem around this code. > If so, please feel free to ask with detail. > > Thanks, > Naoya Horiguchi > -- 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: email@kvack.org