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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 BD614C4361B for ; Wed, 9 Dec 2020 10:38:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 540BA23B7E for ; Wed, 9 Dec 2020 10:38:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 540BA23B7E 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 B96608D0015; Wed, 9 Dec 2020 05:38:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B6C188D000B; Wed, 9 Dec 2020 05:38:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A82848D0015; Wed, 9 Dec 2020 05:38:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 8ED1F8D000B for ; Wed, 9 Dec 2020 05:38:25 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5498C180AD81A for ; Wed, 9 Dec 2020 10:38:25 +0000 (UTC) X-FDA: 77573394570.13.walk11_130517e273ef Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 246CA18140B60 for ; Wed, 9 Dec 2020 10:38:25 +0000 (UTC) X-HE-Tag: walk11_130517e273ef X-Filterd-Recvd-Size: 2362 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Dec 2020 10:38:24 +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 77035ACC3; Wed, 9 Dec 2020 10:38:23 +0000 (UTC) Date: Wed, 9 Dec 2020 11:38:21 +0100 From: Oscar Salvador To: Vlastimil Babka Cc: akpm@linux-foundation.org, n-horiguchi@ah.jp.nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linux API Subject: Re: [PATCH] mm,hwpoison: Return -EBUSY when migration fails Message-ID: <20201209103821.GE30892@linux> References: <20201209092818.30417-1-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Dec 09, 2020 at 11:25:31AM +0100, Vlastimil Babka wrote: > On 12/9/20 10:28 AM, Oscar Salvador wrote: > > Currently, we return -EIO when we fail to migrate the page. > > > > Migrations' failures are rather transient as they can happen due to > > several reasons, e.g: high page refcount bump, mapping->migrate_page > > failing etc. > > All meaning that at that time the page could not be migrated, but > > that has nothing to do with an EIO error. > > > > Let us return -EBUSY instead, as we do in case we failed to isolate > > the page. > > > > While are it, let us remove the "ret" print as its value does not change. > > > > Signed-off-by: Oscar Salvador > > Acked-by: Vlastimil Babka > > Technically this affects madvise(2) so let's cc linux-api. The manpage doesn't > document error codes of MADV_HWPOISON and MADV_SOFT_OFFLINE (besides EPERM) > though so nothing to adjust there. It's meant only for the hwpoison testing > suite anyway. Well, not only for hwpoison testing suite. RAS/CEC and GHES also use soft_offline_page by means of memory_failure_queue in case a page cec count goes beyond a certain thereshold, but they do not really check the return code. Only madvise does. -- Oscar Salvador SUSE L3