Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp247883pxy; Wed, 21 Apr 2021 01:55:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEzstA4BiP44yrvOaegthFa9Pqyogx/pQtWYkCRa40fyGEieQ0G40Xc0KQA7yLwpvAuhva X-Received: by 2002:a17:902:9685:b029:e9:abc1:7226 with SMTP id n5-20020a1709029685b02900e9abc17226mr33430126plp.64.1618995357665; Wed, 21 Apr 2021 01:55:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1618995357; cv=pass; d=google.com; s=arc-20160816; b=KIhqLQmLUDgkvr7npVodkN9VCxVNOK2A3QbWyt+fC6TCJWE9Il+zSQVgEoxkHl86f3 mRi6Fw4pzGpaxmONTP2hyqcCFo+ZdZhdAWcIKEcJBRcEp2C5v+V3FMAEKYqAxEzMbQ8o 2USnIDRWAt1B9KywHnrU3dx0eS21yxIE/P5jwmlSQ1VtR1wWVnreulnTyQ6AbQ+aXnRw AzTARLXS+sgn/RrkeCS/tSQIsJsZ/t1mvZVUNFEODU2OaWfvAVtpWJNnECQLfuGOoew1 OflW3XzDtwLPaqDEKiyoT01G7jcqXW8+M6OAIUoYG6H4sMHXT8UQGn8/vPzexBBoxVuJ D4TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=sKI2fONRJnwbrVp/2uzQafmu3U3tscPFy/Owwq2c9+g=; b=vsxMsTHKj/n5++TGRpykovMNath+NYoECmdxUlsx1K/ZTA8tRcPvWq8eJvPFHWHdNF 1WLpgBSAm6JbySpdWwe4bTNpp6rXB7mRVoXopgBB/oidvI8Wnp9aKsqjjTYYGigXp/CI cnTUhhNWpqbbDtcMl81w8/5V0EY71ltOXvftakHwqJCPaXdX4BiiJIzKrluBNXkSdscX 6s6zxyZcOq/2Rnixpvlbig7avAc2OPB+00RnmgMaMEmy2qGE7IjF1/7oOhzkvk1eW0qW NFm6o+iESU0BeCeF1sLAWZW2n4CBeUKte+Z7nDdHXIl2wTuGbm/+C5tCubeM27GZ2IzS To0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nec.com header.s=selector1 header.b=m99TfznJ; arc=pass (i=1 spf=pass spfdomain=nec.com dkim=pass dkdomain=nec.com dmarc=pass fromdomain=nec.com); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a125si1517796pfa.240.2021.04.21.01.55.45; Wed, 21 Apr 2021 01:55:57 -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=@nec.com header.s=selector1 header.b=m99TfznJ; arc=pass (i=1 spf=pass spfdomain=nec.com dkim=pass dkdomain=nec.com dmarc=pass fromdomain=nec.com); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235433AbhDUIdv (ORCPT + 99 others); Wed, 21 Apr 2021 04:33:51 -0400 Received: from mail-eopbgr1410059.outbound.protection.outlook.com ([40.107.141.59]:55552 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235179AbhDUIdu (ORCPT ); Wed, 21 Apr 2021 04:33:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+lhG6GbIhG7kzXoeoAf3+0t9LQ1LYRJS9QljvchmGE0kWaVffMHvzAwy51VwlgUHrMr4o2Tp+HifzXHGiM+qBjXpIvoIUL0S+Rfohxl5iFkdSVCgc7exjG1i73fJFgS3Mcnp0D+X13lguoEBJaDHzDhArDzbCjJ7GFnKsv666x78kMKt0TKU5ueYzfCAcID0/YFGd4ksAL1Zmznjo8mBMj/EeiOLdUm/LE+RJQp31svJjkXI55qCCU0vaIVvuOiNCKgvIFE2GPw99BrJSXBx73Q6KFNNwLR+Q7J23fE7e9hgUPLiljLba4GhCYFxZ7/TFgL+qAk16onpwasN0Korg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sKI2fONRJnwbrVp/2uzQafmu3U3tscPFy/Owwq2c9+g=; b=knM8oMIepWKhqr/N71VgrwE1/5lJmLY/sxfn+kIuq9bDomIvAv0/eFmN3jkXcSyhlfAByBqusgvBNJJfrjPFLMRJKDnTAkIMWG79nIzmIR9Y1XwY5ymDBP7Z8CNpFVsJeNKxuZEBJ4GFdIE9OLPXOpikp5tPYgXwOZs8a/M+gyrN4lr0QjuFOezIgERmStWIkf/RpUGnbhVONjphBbR/tGZmieQ3hb0HRQr0fXUWXQ7FanvV8T+uPl0V8s/A83clIpZSAJyoXgjSMgQSPXbiGobRHprvcuyM18qxWeNsnI9BfAZsYwxE8JHauMm83ga/hgFJroH/dGiKlwU9CbG3yQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nec.com; dmarc=pass action=none header.from=nec.com; dkim=pass header.d=nec.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nec.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sKI2fONRJnwbrVp/2uzQafmu3U3tscPFy/Owwq2c9+g=; b=m99TfznJsREANi65Ep9u/YkKCeliYpfmkjj+WsIwuP2YH+0oa1l/Muam7HrNfI4PWDUZ98oxbKYGe4Ab5CzNS8J7+5cchAhQxtdELpt2mT3Ib098VQwlXVC0r8itHtShpbxQdRg3v4wZh10f9J61N1unO7FTr3IUdFfHeSi/mS0= Received: from TY1PR01MB1852.jpnprd01.prod.outlook.com (2603:1096:403:8::12) by TYAPR01MB5596.jpnprd01.prod.outlook.com (2603:1096:404:8054::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Wed, 21 Apr 2021 08:33:16 +0000 Received: from TY1PR01MB1852.jpnprd01.prod.outlook.com ([fe80::1552:1791:e07c:1f72]) by TY1PR01MB1852.jpnprd01.prod.outlook.com ([fe80::1552:1791:e07c:1f72%7]) with mapi id 15.20.4042.024; Wed, 21 Apr 2021 08:33:16 +0000 From: =?utf-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPo+OAgOebtOS5nyk=?= To: Michal Hocko CC: Muchun Song , "mike.kravetz@oracle.com" , "akpm@linux-foundation.org" , "osalvador@suse.de" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH] mm: hugetlb: fix a race between memory-failure/soft_offline and gather_surplus_pages Thread-Topic: [PATCH] mm: hugetlb: fix a race between memory-failure/soft_offline and gather_surplus_pages Thread-Index: AQHXNoTZ/dsTmwNUxkyFM7XUqHdaa6q+pOiA Date: Wed, 21 Apr 2021 08:33:16 +0000 Message-ID: <20210421083315.GA7552@hori.linux.bs1.fc.nec.co.jp> References: <20210421060259.67554-1-songmuchun@bytedance.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=nec.com; x-originating-ip: [165.225.97.70] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 09cd7bfb-d26c-4cdf-2b7b-08d904a01c2a x-ms-traffictypediagnostic: TYAPR01MB5596: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: N5lPMB8KrlcQdXlgBw3wclv4MUSIZ1z7h86JLOxvKG3ilTLEBnEmaQAzDctPwFyzhYLqUSCZaGEsnxrbSc3F/nrtWIz7QuWBF7fB7iPN5+NHD628mxPdjerDAVQYxKEphyXo0vaewYclL6RqRm98sGtBwrAfKbf7EvvhVH0hpM9XjTVbEIuzgv98/TpsP4jYelQO+D0p2u5x2aV4HW95DFtF6Wp8oxSvCpihsK+OgH1zN29l6otefzPvjByd7vXgx6pKwpGPUe3hO6XFqEDpFNqeZ1JF5LCrpl6OdEdopvsgpAqB2nq3M/htA6ryU/gnnPFo1dnR3G3jNr14btGuWOGa3RvPSg2K1NPoaTNcUPDJcDOpox34vG8bZYg0TqQEzYOKUC1TseA6lijLeVIYxp1NcPAiFgOWB7TJXQ7knmxOrCLKeMg3f9KnudogVc0q1fRPFO9sVTbbUsdyQXvFwrG4At3A4gHnFM5b/1yI4XgMJYAt7LICmMOqd8SbwVzzsYpr3oqXiuvI6JvvrkAFenN7zxTU9Xk/7dGFYGRfBjXb7aC5bAVZywk5NaqgWPzKpjbYqJ267Zzv+AWg1VSjvYpaAvywFF+jfUVXMIDIeR4= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY1PR01MB1852.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(136003)(346002)(39860400002)(376002)(2906002)(1076003)(38100700002)(26005)(64756008)(6506007)(83380400001)(66946007)(122000001)(76116006)(33656002)(66446008)(6486002)(54906003)(55236004)(478600001)(9686003)(316002)(5660300002)(66476007)(8936002)(8676002)(186003)(86362001)(71200400001)(4326008)(85182001)(6916009)(66556008)(6512007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messag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AIQjCdo6RTO?= Content-Type: text/plain; charset="utf-8" Content-ID: <7DCCF41F02107D4DB87A33C4AF050078@jpnprd01.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nec.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TY1PR01MB1852.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09cd7bfb-d26c-4cdf-2b7b-08d904a01c2a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2021 08:33:16.2540 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e67df547-9d0d-4f4d-9161-51c6ed1f7d11 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: C5JoZzCXEVRUObg/OaDmWv7GySBBBoI4IylIe1LYJrITf/V2lVBAg60M9V/rJLy9svq3XS96yOBxnzCNdJOUSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5596 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCBBcHIgMjEsIDIwMjEgYXQgMTA6MDM6MzRBTSArMDIwMCwgTWljaGFsIEhvY2tvIHdy b3RlOg0KPiBbQ2MgTmFveWFdDQo+IA0KPiBPbiBXZWQgMjEtMDQtMjEgMTQ6MDI6NTksIE11Y2h1 biBTb25nIHdyb3RlOg0KPiA+IFRoZSBwb3NzaWJsZSBiYWQgc2NlbmFyaW86DQo+ID4gDQo+ID4g Q1BVMDogICAgICAgICAgICAgICAgICAgICAgICAgICBDUFUxOg0KPiA+IA0KPiA+ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZ2F0aGVyX3N1cnBsdXNfcGFnZXMoKQ0KPiA+ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlID0gYWxsb2Nfc3VycGx1c19odWdlX3Bh Z2UoKQ0KPiA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