Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp307677pxf; Wed, 31 Mar 2021 04:00:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOvwQcNLd4yBjPsmw2ikM3OH6o09DZyiMY4w64m6H3ocsUXPIKABYdPstj9rb+MS/Exy83 X-Received: by 2002:a05:6402:1350:: with SMTP id y16mr2880410edw.309.1617188455804; Wed, 31 Mar 2021 04:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617188455; cv=none; d=google.com; s=arc-20160816; b=Q7m7CC6UQU5W87MEcbse6GpDrNtFL7KnIzCZa1r5NS3E5rRUuF57+pR2gJ3GtAuK7N hp2Ko0epn/37k88z+1vMU0JyaZ44YYFOJbpZHzQ0QRGZ/8qt0wVEYd42cenPB1OLUe0+ 1X2Oulzx8ip1jS6dpAnY4gv77/K+YBXUPjJ7L7IlcZCs1R65f6i6McycWjFwMB23j3WA UKsT6eZKMiemmqOgi0JEXiCxRhZjo6FQF2THlFoPXAfrgTTBR79XNS+veIrV6Y09fT/Q ApWAyHzVxQ+F9/2ZA6Hc6rDlyLN+0Qr8J6KRO7jxe+mljeRaOhqP5CqzRB8YPLDyuoc6 Zz8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=h6L2AUqo5nz2UoERmv8ppYznSIQciq71zeLTZsRCRB0=; b=o0CDhulRT/PFPgNL1+TZInrUNIK/JJegBNFahb3Y213HevmIHCroqEizHDgHfMp/lf p5ZCT0eIJ0KrBDU3MnOisMJ4FeMmg/2FpKSH0qRQ5vq0zK7qFO1NHsO3FwY/6KUhvzni t90cfzECxu1HPrQVAOdhsZRlLmFAKKLGlH+YNcie7aI7S+mtWlvdwwuG9YAD/ro87+bo RcWtKV4yTrqOP6RyS/c6TPUqTzKnhr4wReH09BhiWBJMLsU0THeDbIo+stJ+BbFYTJbC Oelrij0QNohWXWJQOJoiDi+ujizFMuhb5aFNGUcLFjR8NlOp0Xd3OHQJv47JkJgs8XoF hQiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H+C2645T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx21si1278717ejc.503.2021.03.31.04.00.32; Wed, 31 Mar 2021 04:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H+C2645T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235239AbhCaK7k (ORCPT + 99 others); Wed, 31 Mar 2021 06:59:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:57924 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235165AbhCaK7C (ORCPT ); Wed, 31 Mar 2021 06:59:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617188342; 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=H+C2645TlHrCxc0nyPOvpZzOgmhGq8HRKTzcegY0e/Wuz2UHLrv0WZwpLv/H8cp88cq+RH JalkyHJcENQkvxtpzbmtWp56nEiJrcRDiq3SWRA4W8e0koDkTf9k9YhJsBjqLC5QnfBbjH lvxVDKkrFQDURFtOkjWdapTdQasiTWs= 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.03.21 12:56, Aili Yao wrote: > On Thu, 25 Feb 2021 12:39:30 +0100 > Oscar Salvador wrote: > >> On Thu, Feb 25, 2021 at 11:28:18AM +0000, HORIGUCHI NAOYA(堀口 直也) 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 solution. >> >> 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. >> > > Hi Oscar, david: > > 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. > > Really sorry for this! > > 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. -- Thanks, David / dhildenb