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=unavailable 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 D684DC4361B for ; Wed, 9 Dec 2020 10:39:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9361C23B79 for ; Wed, 9 Dec 2020 10:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729995AbgLIKjP (ORCPT ); Wed, 9 Dec 2020 05:39:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:58508 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729861AbgLIKjF (ORCPT ); Wed, 9 Dec 2020 05:39:05 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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