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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,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 75289C433ED for ; Thu, 15 Apr 2021 12:42:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51E766137D for ; Thu, 15 Apr 2021 12:42:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232889AbhDOMmc (ORCPT ); Thu, 15 Apr 2021 08:42:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33257 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbhDOMma (ORCPT ); Thu, 15 Apr 2021 08:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618490527; 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=zACdA77WTa2D+EH6NmqEJg1JcWkY/0DDkKu1lgaix30=; b=O5l2PiE+R+uEMg5W7Lmi+vk99F9WdWAmXJ89wMzyHOeaQMz806866z7KjcViwsnv226ZSh 1Ml/QdzTkxM6oMD7Xww/B9fIUT6kBecXq1bfxbsnbXGhoprrSYziu1jJclAuBUXORx+doc Ete7Vej5azYKy+PXCF4RqoP1jgnc5is= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-UcS9PgqlOUyfRZkEoV95mw-1; Thu, 15 Apr 2021 08:42:05 -0400 X-MC-Unique: UcS9PgqlOUyfRZkEoV95mw-1 Received: by mail-wm1-f71.google.com with SMTP id f134-20020a1c1f8c0000b029012e03286b7bso775772wmf.0 for ; Thu, 15 Apr 2021 05:42:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=zACdA77WTa2D+EH6NmqEJg1JcWkY/0DDkKu1lgaix30=; b=Pop6up+CISi9MKNBaa2qQCGlwXysIlMHiUxjDZzpomS+i/GzX5/ZjqZbfjAP6Y5mtm LTqq8SeEdQRl08aSzIpoNH6n11TzU0kQxRQt4+N+Fk5SToRzXTeqdQOtIWqQgM4Reubo 7VNhEH7r0v5o1tGKmNf7R0byDjIIW/NKUm2QGjwQGsQorzQU7O0UJiJAEAlw+BRhrckc L1V474BUslaMXCcRHZPfZNfNHvb5+HIPPTx+sL86/BoUluUHlODw+PlzOb1DymkpnRX6 xZ+YmVRC3SzQjxBHXpZCufGcMt9EEKE8/jMctgIMDl8QJYET/oicLIXfWzRFrQaKcVaC 4sYA== X-Gm-Message-State: AOAM5324MR+q98KdSZyFwoJR6a6MyFWQMiUowQIMF3hapbULEceNQbIf +9D9anNHgnN/T7EdQss4GKj7Tl3u/sCBdKjMbQQFhlCJi6rgIhwh58JziR1Z0KLbVB1T7hQaC5y dhNX7+tziYLgDZ0BgMoFx2D/xZH6E9kSSMlVwesLFmYINe94u5D9hGXWGjpMgMuWBbLeIbyH5 X-Received: by 2002:a05:6000:c2:: with SMTP id q2mr3452640wrx.200.1618490524816; Thu, 15 Apr 2021 05:42:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTws3Xaqrmc9w/HCKZ9yvo04+CNq4y+/1CSb9wDtEOkwkQSuu08CvKB2o4T5u6PO45lfr3Pw== X-Received: by 2002:a05:6000:c2:: with SMTP id q2mr3452619wrx.200.1618490524640; Thu, 15 Apr 2021 05:42:04 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6392.dip0.t-ipconnect.de. [91.12.99.146]) by smtp.gmail.com with ESMTPSA id 18sm1378876wmo.47.2021.04.15.05.42.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Apr 2021 05:42:04 -0700 (PDT) Subject: Re: [PATCH v8 2/7] mm,compaction: Let isolate_migratepages_{range,block} return error codes To: Oscar Salvador , Andrew Morton Cc: Mike Kravetz , Vlastimil Babka , Michal Hocko , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210415103544.6791-1-osalvador@suse.de> <20210415103544.6791-3-osalvador@suse.de> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Thu, 15 Apr 2021 14:42:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210415103544.6791-3-osalvador@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.04.21 12:35, Oscar Salvador wrote: > Currently, isolate_migratepages_{range,block} and their callers use > a pfn == 0 vs pfn != 0 scheme to let the caller know whether there was > any error during isolation. > This does not work as soon as we need to start reporting different error > codes and make sure we pass them down the chain, so they are properly > interpreted by functions like e.g: alloc_contig_range. > > Let us rework isolate_migratepages_{range,block} so we can report error > codes. > Since isolate_migratepages_block will stop returning the next pfn to be > scanned, we reuse the cc->migrate_pfn field to keep track of that. > > Signed-off-by: Oscar Salvador > Acked-by: Vlastimil Babka > Acked-by: Mike Kravetz Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb