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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,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 DA771C433E2 for ; Wed, 31 Mar 2021 10:59:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E96761987 for ; Wed, 31 Mar 2021 10:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E96761987 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A05D06B007E; Wed, 31 Mar 2021 06:59:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DCE96B0081; Wed, 31 Mar 2021 06:59:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A5296B0082; Wed, 31 Mar 2021 06:59:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 706946B007E for ; Wed, 31 Mar 2021 06:59:01 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3807B1801D230 for ; Wed, 31 Mar 2021 10:59:01 +0000 (UTC) X-FDA: 77979872082.07.1717D16 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 92398E0011CE for ; Wed, 31 Mar 2021 10:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617188340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h6L2AUqo5nz2UoERmv8ppYznSIQciq71zeLTZsRCRB0=; b=czefrgqDbISmLc+NDLK6MlPzXlMXPp2qFDImdhtBNd5jABV85k2DWxG1VJC6DdEQo1EtxG VOt6PQeeeQXjOVj+4kjnEi82Jo2YTY5CAsY9rf4Ud+Wo4DZ9H9mZnPbgUI7ZKDpC8tfFLn 7TIqJ8XLHshLya+uiBkoxJTZhAOc2EE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-482-hWliKZPRN5OCmyKvlfuoNw-1; Wed, 31 Mar 2021 06:58:58 -0400 X-MC-Unique: hWliKZPRN5OCmyKvlfuoNw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E61F107ACCD; Wed, 31 Mar 2021 10:58:56 +0000 (UTC) Received: from [10.36.113.60] (ovpn-113-60.ams2.redhat.com [10.36.113.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5253F6F135; Wed, 31 Mar 2021 10:58:51 +0000 (UTC) Subject: Re: [PATCH] mm,hwpoison: return -EBUSY when page already poisoned To: Aili Yao , Oscar Salvador , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKCDloIDlj6Mg55u05LmfKQ==?= Cc: "tony.luck@intel.com" , "akpm@linux-foundation.org" , "bp@alien8.de" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "inux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "yangfeng1@kingsoft.com" References: <20210224151619.67c29731@alex-virtual-machine> <20210224103105.GA16368@linux> <20210225114329.4e1a41c6@alex-virtual-machine> <20210225112818.GA10141@hori.linux.bs1.fc.nec.co.jp> <20210225113930.GA7227@localhost.localdomain> <20210331185637.76f863e2@alex-virtual-machine> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <0d6f0f9c-f644-1246-0530-e39656a207ca@redhat.com> Date: Wed, 31 Mar 2021 12:58:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210331185637.76f863e2@alex-virtual-machine> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Queue-Id: 92398E0011CE X-Stat-Signature: naxy6zjy5etra197ifurfzruxdnzc83d X-Rspamd-Server: rspam02 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617188339-162505 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 31.03.21 12:56, Aili Yao wrote: > On Thu, 25 Feb 2021 12:39:30 +0100 > Oscar Salvador wrote: >=20 >> On Thu, Feb 25, 2021 at 11:28:18AM +0000, HORIGUCHI NAOYA(=E5=A0=80=E5= =8F=A3 =E7=9B=B4=E4=B9=9F) wrote: >>> Hi Aili, >>> >>> I agree that this set_mce_nospec() is not expected to be called for >>> "already hwpoisoned" page because in the reported case the error >>> page is already contained and no need to resort changing cache mode. >> >> Out of curiosity, what is the current behavour now? >> Say we have an ongoing MCE which has marked the page as HWPoison but >> memory_failure did not take any action on the page yet. >> And then, we have another MCE, which ends up there. >> set_mce_nospec might clear _PAGE_PRESENT bit. >> >> Does that have any impact on the first MCE? >> >>> It seems to me that memory_failure() does not return MF_XXX. But yes= , >>> returning some positive value for the reported case could be a soluti= on. >> >> No, you are right. I somehow managed to confuse myself. >> I see now that MF_XXX return codes are filtered out in page_action. >> >>> We could use some negative value (error code) to report the reported = case, >>> then as you mentioned above, some callers need change to handle the >>> new case, and the same is true if you use some positive value. >>> My preference is -EHWPOISON, but other options are fine if justified = well. >> >> -EHWPOISON seems like a good fit. >> >=20 > Hi Oscar, david: >=20 > Long away fron this topic, but i noticed today I made a stupid mistake = that EHWPOISON is already > been declared, so we should better return EHWPOISON for this case. >=20 > Really sorry for this! >=20 > As the patch is still under review, I will post a new version for this,= if I change this, may I add > your review tag here please? Just resend as v2. We will review and post our RBs there. --=20 Thanks, David / dhildenb