From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EB01C433E0 for ; Fri, 15 Jan 2021 08:49:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D396723329 for ; Fri, 15 Jan 2021 08:49:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D396723329 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D36C8D0141; Fri, 15 Jan 2021 03:49:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2844B8D0023; Fri, 15 Jan 2021 03:49:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19A668D0141; Fri, 15 Jan 2021 03:49:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 01CF98D0023 for ; Fri, 15 Jan 2021 03:49:34 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CA5CE180AD801 for ; Fri, 15 Jan 2021 08:49:34 +0000 (UTC) X-FDA: 77707385868.12.paste81_17067d12752e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id ABD361801FF05 for ; Fri, 15 Jan 2021 08:49:34 +0000 (UTC) X-HE-Tag: paste81_17067d12752e X-Filterd-Recvd-Size: 2255 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 08:49:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A3D52AA6F; Fri, 15 Jan 2021 08:49:32 +0000 (UTC) Date: Fri, 15 Jan 2021 09:49:24 +0100 From: Oscar Salvador To: Aili Yao Cc: naoya.horiguchi@nec.com, linux-mm@kvack.org, yangfeng1@kingsoft.com Subject: Re: [PATCH] mm,hwpoison: non-current task should be checked early_kill for force_early Message-ID: <20210115084920.GA4092@linux> References: <20210115155506.2d59fe83.yaoaili@kingsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210115155506.2d59fe83.yaoaili@kingsoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 15, 2021 at 03:55:06PM +0800, Aili Yao wrote: > Hello,From 740148005f1333150ee1e119ed8a34454abb7c1d Mon Sep 17 00:00:00 2001 > From: Aili Yao > Date: Fri, 15 Jan 2021 14:56:06 +0800 > Subject: [PATCH] mm,hwpoison: non-current task should be checked early_kill > for force_early > > Other process may also care the error info with the early-kill flag set. > when force_early is set, and if tsk is not current, leave it to the > early-kill flag check. I am having a hard time trying to grasp what are you trying to achieve here. Could you elaborate some more? Ideally stating what is the problem you are fixing here. I was also a bit confused about task_early_kill. So, if force_early is true (aka. MF_ACTION_REQUIRED was set), we only return a task struct if we find the task or a thread belonging to the task (sharing the mm). If it is not set by the caller of memory_failure, we still want to check the task/threads' MCE policy to check whether PF_MCE_KILL_EARLY it was set with prctl, right? That makes sense to me. So, back to your change, if force_early was set, but the main task does not match, you still want to check whether any thread belonging to the main task has the policy set? -- Oscar Salvador SUSE L3