Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp558016ybx; Wed, 30 Oct 2019 20:16:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQQOfAO3gx2uRGQDtzRvqd83m+o4qtueQ58z6Ml+34y+NbEOMuE/nJ5tgp7L71ykUaRz8P X-Received: by 2002:a05:6402:1203:: with SMTP id c3mr3364327edw.136.1572491774703; Wed, 30 Oct 2019 20:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572491774; cv=none; d=google.com; s=arc-20160816; b=es+lzF85bPE1orGsp91wWWlO86CovYjUW/KFraS8p2vgrKV/+6T2NySuDQ6jfzr+tw +dexpcX6AyMI+vpMaAPBBcIMbj9r/BRyDVFgkuoGu7oBBxaOocL3IJlugxAMKihf+C47 vrzlQzgVXOGTTQW2a1qKo7s+XPkHNKS7ItA98Qflx3DKBDiYg4IVNpHAJw9IwU7BQCCK zDGg+W4+6gkC0fIKKVQGNOvTD6j3rid5noUNkHLXrOmMt3usArW565iDiCgn5ES0koRF p3dwaselIlnVkrl8jRtkJ84OSkuLhzzw4NsPCNxzr1HmLoJTftAEb0Nkz4qbssCCT6Wg VbJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :mime-version:references:subject:cc:to:from:date:dkim-signature; bh=ikKgT4phGkiemnDn9uv5tBrPDv6LRqZZqhBKISBfT2E=; b=r3fytMJ+rwO2eo/eiqXTQscIcILK/+pm45qZ9kyGyU9m1aILmABEYq46bgSVt8n8hf Gz+sV3xeWXTdsjHfA4H6DotZGhcsIRQfXc/YEh0YhyETblR2Q5Q7p2yiW1mhUyGk5jB0 kfn5346OME6T2+ZdhzuG39DUpHULkTsiWkKimTaxPAqyac2O33UBxq1cpLGSRCQ0t5FL 3SfhCGe8s5FfyxgQUYS8/GoPpwRZlYNsrQC7NbLQ9i8MqW1JELKoGxlF/iqKtqMQXkN7 fZkWxf7Uo5beDXO2NngRgLNbChclaasy/pN97aaferP4xgLeEkfsSzVbbQb0o9n/Daup IGCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g8RASjPE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si2673343ejd.314.2019.10.30.20.15.47; Wed, 30 Oct 2019 20:16:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g8RASjPE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbfJaDPQ (ORCPT + 99 others); Wed, 30 Oct 2019 23:15:16 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38246 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfJaDPP (ORCPT ); Wed, 30 Oct 2019 23:15:15 -0400 Received: by mail-lj1-f195.google.com with SMTP id y23so4602679ljc.5; Wed, 30 Oct 2019 20:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:references:mime-version:message-id :content-transfer-encoding; bh=ikKgT4phGkiemnDn9uv5tBrPDv6LRqZZqhBKISBfT2E=; b=g8RASjPETWl0dgPdytS1ac2NjiKUL7ivzcbDKd8hT9A5Nel/c3exYH8rQtEzj24skC Q2vo9vD8jVtm5k2OTTNmeZcWKHAosZrvb/akIiXCa+q0Aaq2d+DupZ4KW3lbaRT827sT gMrSgznom6jH9FkQXqwTxitvXUNpGav4MPb2RVTniSw6CMUFltIl6A06Eqc4AkgOakKx 5nqwBNu2pwZxGZ/YKbJTGDIK/QXa95hyukrZa0kQqAlrHc9hpu4pMMGMQqzchDYPLrY6 yRZoRTdou22oFY9U8sXpsYnlVmycXOqlqgK0c8hSJhKy5beTx0Vz2SlVgb9zJUlasEs6 NjxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:references:mime-version :message-id:content-transfer-encoding; bh=ikKgT4phGkiemnDn9uv5tBrPDv6LRqZZqhBKISBfT2E=; b=A7E2m+NLZnPYeWIDGpSBlsYYas0/+NOVhGzKcZlue7prPimWcisjB83cTvFhbSALrY NYNwbtlQM4AUYORoFFs39LxUpBPD45IWw9ZYT9WIK/f21CiGZb3Lb5JuDMi9qANS8i80 RjhT82ZJ+b6Zkf/BW0Vn9TYPvDOrw3CyzS7E709rUMT19PSB/2EoOrsoXeY+DwtUgkM4 Ja6ss/Pswop5DHFCtWTdhBehV4OJKu8CwHe+HYI4jB6wRnu745a4L7DR3amt66eAv3VY bAQfFaO5zLXWaeY+xZ42st4WGrvHgOW9lLw8x8FnxL7fmGC1W+Hf+PvYIcJX7qg3LnL/ Os6g== X-Gm-Message-State: APjAAAVlisubLw8ZKKaDCS4DtELPyNNdN64YB/A8vBLHZhmhRku4uBb6 FXiuaduyxI4XCOd6EdOczKw= X-Received: by 2002:a2e:88c1:: with SMTP id a1mr2155373ljk.204.1572491712548; Wed, 30 Oct 2019 20:15:12 -0700 (PDT) Received: from N-20L6PF1KTYA2 ([131.228.2.21]) by smtp.gmail.com with ESMTPSA id z22sm593255ljm.92.2019.10.30.20.15.09 (version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 20:15:11 -0700 (PDT) Date: Thu, 31 Oct 2019 11:15:09 +0800 From: "Li Xinhai" To: "linux-mm@kvack.org" , n-horiguchi , akpm Cc: "Vlastimil Babka" , "Michal Hocko" , "linux-kernel@vger.kernel.org" , "Linux API" , "Hugh Dickins" Subject: Re: [PATCH v2] mm: Fix checking unmapped holes for mbind References: <201910291756045288126@gmail.com> X-Priority: 3 X-GUID: FCAE7372-2FB5-4EB4-8FED-18F68E495B1E X-Has-Attach: no X-Mailer: Foxmail 7.2.13.365[cn] Mime-Version: 1.0 Message-ID: <2019103111150700409251@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMjAxOS0xMC0yOcKgYXQgMTc6NTbCoExpIFhpbmhhacKgd3JvdGU6Cj5xdWV1ZV9wYWdlc19y YW5nZSgpIHdpbGwgY2hlY2sgZm9yIHVubWFwcGVkIGhvbGVzIGJlc2lkZXMgcXVldWUgcGFnZXMg Zm9yCj5taWdyYXRpb24uIFRoZSBydWxlcyBmb3IgY2hlY2tpbmcgdW5tYXBwZWQgaG9sZXMgYXJl Ogo+MSBVbm1hcHBlZCBob2xlcyBhdCBhbnkgcGFydCBvZiB0aGUgc3BlY2lmaWVkIHJhbmdlIHNo b3VsZCBiZSByZXBvcnRlZCBhcwo+wqAgRUZBVUxUIGlmIG1iaW5kKCkgZm9yIG5vbmUgTVBPTF9E RUZBVUxUIGNhc2VzOwo+MiBVbm1hcHBlZCBob2xlcyBhdCBhbnkgcGFydCBvZiB0aGUgc3BlY2lm aWVkIHJhbmdlIHNob3VsZCBiZSBpZ25vcmVkIGlmCj7CoCBtYmluZCgpIGZvciBNUE9MX0RFRkFV TFQgY2FzZTsKPk5vdGUgdGhhdCB0aGUgc2Vjb25kIHJ1bGUgaXMgdGhlIGN1cnJlbnQgaW1wbGVt ZW50Y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