Received: by 10.213.65.68 with SMTP id h4csp2145811imn; Sun, 8 Apr 2018 20:54:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LcX7bYMgjSZG7CiQRTvRzJu5idbDgagr4wSWTI1CFjdnteHh+KrGJsEusXkioZR4Bstxf X-Received: by 10.167.130.22 with SMTP id k22mr27957810pfi.73.1523246062937; Sun, 08 Apr 2018 20:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523246062; cv=none; d=google.com; s=arc-20160816; b=Rj1nLDjGo39i5Qyla+RJ2HFLVpby3F7p1QIoNDcGz5g+HEl+H4UoMIU7JzU/AzIfXT 4q5uIllKBMvs/yWHF0zhOmsFGxYGzJTA6B+wwr4QqoQ9O46ZmuT39uNsA8rui7DWsl4R C9WfcK+jpFVUEWVxe8G5lB0i3p89sfPOM7lEuXnaCRLqwZIH56bBEfWC2Bj49EQv5How T2VpjAMf4njGGzH33OqlNsGHvxlHDkrF3IJ/uQ7hHyT6pRJljOwx1ztXb9Llwa5G2WAy GBlsM6lB0RgigA1eQhb+mgq3HNsHaqsg6fwJ9H2q5qlfo59+cJFqoac7K8SEH3q4pV0X 7kIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wLr6/0wG8qF+vQCjuBgCUqkqm415+5u9wnPf3iNKubo=; b=SeHIX6nRbCUmqpySbwKQ/s6PEYw0j0YtI6iUjsW9hEFSOTl1O0353jK+52f9OL1lRQ tQxAdj5PPR8943O+3xmH03tF6cwXtNeAD2v5toFfS4jGzyIDpTjeNRlXiWVmKfRjKBdh HB9nlFJ1Ler1ywpEAh9ZcR5L5qO+ScvDcAHVZbL6mwOMWoQgo7RziZbSY2i4vtidlYs5 C92U7z1Rci9Cdj+SDQUn0d8qSKN2UnMdSA6AtPRS0KoGwWRmDC3k2dgsIbaj/WgB2xvU Fho1hIXT9Z0ec6bidfR9uDfdmpnZf2Ir2UOgkK+I1cokh5DWpg8eUwhJRoUpmrjCL5lu vHYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=F9cZSiqd; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si11964432pfk.14.2018.04.08.20.53.45; Sun, 08 Apr 2018 20:54:22 -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=@microsoft.com header.s=selector1 header.b=F9cZSiqd; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754251AbeDIDs3 (ORCPT + 99 others); Sun, 8 Apr 2018 23:48:29 -0400 Received: from mail-bn3nam01on0125.outbound.protection.outlook.com ([104.47.33.125]:5792 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754125AbeDIAUG (ORCPT ); Sun, 8 Apr 2018 20:20:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wLr6/0wG8qF+vQCjuBgCUqkqm415+5u9wnPf3iNKubo=; b=F9cZSiqd0IGFnawgTOb7XA3NGyV0pWzVt4cLYoGYzvLfbPFxdjBnx6/NQskyq+fvnBjQCP2CEgf6o3MjUia3rfE6hIW2kgziUpq8imhRu7KzrYmcmGSjmBKwzmpJLUUYorXyxmr0U5BByhDNi+j72pHwLByLLsXXKIy1onMfhDo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0726.namprd21.prod.outlook.com (10.167.108.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:20:04 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:20:04 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Yang Shi , Hugh Dickins , Andrea Arcangeli , Arnd Bergmann , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 123/189] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Topic: [PATCH AUTOSEL for 4.15 123/189] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Index: AQHTz5hGBES3r6FwU0KoNm0YpSZ2gA== Date: Mon, 9 Apr 2018 00:18:25 +0000 Message-ID: <20180409001637.162453-123-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0726;7:kaWJV73N58GVgQ873eD1QZ/zNXAJjfAjq68pV7iRnZicfMYiB9bNxBWYxKoqcIusGDbIsyDnGtpNtxvMi54AOVp0fdQcxrPQ2ebeUliyUk+47vbk4KiT1L6ov+Vo2TV6svnvMJuT/e+2YNCL2ZW6lg7iEHxxG2xsY6D6Je+HqUSsW1kDYzXGxR+g6zCGJXj6emiSu2UIC+XqvlX79t+icvlfwH/PnqFbCISOaqH3pqepxEu9NB7shatqKNLhjEx0;20:xgYgaxKTqLf9/UKR3OJjFrrm5RyzkAqFSmHxuQpAERjaMGizzbO8gIfv4TlvE3ThLRWCTAAi38m8zzRHw+RTtpCxFZE80BlcQoIOpyvzEVslaIuyXgP0LheSXK8IL3bpD0nk2Esm78LVFQTi4OyEYFAQT1vR2jpyXg818EsXTrM= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 45e8ad3f-d697-41fc-6206-08d59dafa41a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0726; x-ms-traffictypediagnostic: DM5PR2101MB0726: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(788757137089)(211936372134217)(42068640409301)(153496737603132)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0726;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0726; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(39380400002)(39860400002)(396003)(376002)(199004)(189003)(6306002)(6486002)(26005)(6512007)(4326008)(81166006)(6666003)(6436002)(81156014)(8676002)(97736004)(186003)(36756003)(72206003)(53936002)(107886003)(2906002)(966005)(86362001)(76176011)(110136005)(305945005)(10090500001)(486006)(3660700001)(102836004)(5660300001)(14454004)(476003)(86612001)(446003)(99286004)(68736007)(66066001)(11346002)(54906003)(2616005)(1076002)(7736002)(5250100002)(25786009)(8936002)(478600001)(2900100001)(2501003)(3280700002)(105586002)(59450400001)(316002)(106356001)(22452003)(6506007)(3846002)(10290500003)(6116002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0726;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: n898Jh2I3EOojnI/F1tWcrvoozc/pC+Ew4AZkPE748l6jLEBihGSOnCQ1WSyHEhbrMkDfSdKoPr0ke2m3b2UHpCB2R6EVsRs/9LBj4NOwzJBRzPKXdT0p3YnUDzkWL0KgKcw1DEHsIXpn1OcIFzZOEXzIIMjpGlxFR4m7tJ7gXD+Rt4R1pQyXjohSLhLHIYpazFI6XNVO4mP/QlgzcKP4e632Hn+M8IjVaHafJtwNm5ybhkEVn1ttNC5GYKk65nV4I4fcwC5uyLf9odU6YQeIpC/HcBhvBN9jyWqTmNy4MKNyfTAm5kBT0RI2kfoRjrug773Jt8nm8ZNe0mYqLK8hWSRyPbJ7QI+ShTiVWZV8wixLd0DSw7gRrjb89CsVKgVt/gjbJGHn+VWogQ6JbQZPSnrzSJV2dWN5jKIJF7AEkY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <813E8B80C860CD46BD5B35643F0A0CA6@namprd21.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45e8ad3f-d697-41fc-6206-08d59dafa41a X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:25.2541 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0726 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogWWFuZyBTaGkgPHlhbmcuc0BhbGliYWJhLWluYy5jb20+DQoNClsgVXBzdHJlYW0gY29t bWl0IDNiNDU0YWQzNTA0M2RmYmQzYjVkMmJiOTJiMDk5MWQ2MzQyYWZiNDQgXQ0KDQpJbiB0aGUg Y3VycmVudCBkZXNpZ24sIGtodWdlcGFnZWQgbmVlZHMgdG8gYWNxdWlyZSBtbWFwX3NlbSBiZWZv cmUNCnNjYW5uaW5nIGFuIG1tLiAgQnV0IGluIHNvbWUgY29ybmVyIGNhc2VzLCBraHVnZXBhZ2Vk IG1heSBzY2FuIGEgcHJvY2Vzcw0Kd2hpY2ggaXMgbW9kaWZ5aW5nIGl0cyBtZW1vcnkgbWFwcGlu Zywgc28ga2h1Z2VwYWdlZCBibG9ja3MgaW4NCnVuaW50ZXJydXB0aWJsZSBzdGF0ZS4gIEJ1dCB0 aGUgcHJvY2VzcyBtaWdodCBob2xkIHRoZSBtbWFwX3NlbSBmb3IgYQ0KbG9uZyB0aW1lIHdoZW4g bW9kaWZ5aW5nIGEgaHVnZSBtZW1vcnkgc3BhY2UgYW5kIGl0IG1heSB0cmlnZ2VyIHRoZQ0KYmVs b3cga2h1Z2VwYWdlZCBodW5nIGlzc3VlOg0KDQogIElORk86IHRhc2sga2h1Z2VwYWdlZDoyNzAg YmxvY2tlZCBmb3IgbW9yZSB0aGFuIDEyMCBzZWNvbmRzLg0KICBUYWludGVkOiBHIEUgNC45LjY1 LTAwNi5hbGkzMDAwLmFsaW9zNy54ODZfNjQgI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cmUgY2hhbmNlcyB0byBpbnN0YWxsIFRIUC4gIFRo ZW4NCmtodWdlcGFnZWQgY2FuIGNvbWUgYmFjayB0byBzY2FuIHRoZSBza2lwcGVkIG1tIHdoZW4g aXQgaGFzIGZpbmlzaGVkIHRoZQ0KY3VycmVudCByb3VuZCBmdWxsX3NjYW4uDQoNCkFuZCBpdCBh cHBlYXJzIHRoYXQgdGhlIGNoYW5nZSBjYW4gaW1wcm92ZSBraHVnZXBhZ2VkIGVmZmljaWVuY3kg YQ0KbGl0dGxlIGJpdC4NCg0KQmVsb3cgaXMgdGhlIHRlc3QgcmVzdWx0IHdoZW4gcnVubmluZyBM VFAgb24gYSAyNCBjb3JlcyA0R0IgbWVtb3J5IDINCm5vZGVzIE5VTUEgVk06DQoNCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXN0aW5lICAgICAgICAgIHcvIHRyeWxvY2sN CiAgZnVsbF9zY2FuICAgICAgICAgICAgICAgICAgICAgICAgIDE5NyAgICAgICAgICAgICAgIDE4 Nw0KICBwYWdlc19jb2xsYXBzZWQgICAgICAgICAgICAgICAgICAgMjEgICAgICAgICAgICAgICAg MjYNCiAgdGhwX2ZhdWx0X2FsbG9jICAgICAgICAgICAgICAgICAgIDQwODE4ICAgICAgICAgICAg IDQ0NDY2DQogIHRocF9mYXVsdF9mYWxsYmFjayAgICAgICAgICAgICAgICAxODQxMyAgICAgICAg ICAgICAxNjY3OQ0KICB0aHBfY29sbGFwc2VfYWxsb2MgICAgICAgICAgICAgICAgMjEgICAgICAg ICAgICAgICAgMTUwDQogIHRocF9jb2xsYXBzZV9hbGxvY19mYWlsZWQgICAgICAgICAxNCAgICAg ICAgICAgICAgICAxNg0KICB0aHBfZmlsZV9hbGxvYyAgICAgICAgICAgICAgICAgICAgMzY5ICAg ICAgICAgICAgICAgMzY5DQoNCltha3BtQGxpbnV4LWZvdW5kYXRpb24ub3JnOiBjb2Rpbmctc3R5 bGUgZml4ZXNdDQpbYWtw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