Received: by 10.213.65.68 with SMTP id h4csp2121420imn; Sun, 8 Apr 2018 20:14:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+vyLygRwFM0B8RCRGQVOYS6BNL5OHhQsNkR8idL7Ilw0rqhC/TL0/gKbR/NfXnvZcMotKF X-Received: by 2002:a17:902:a514:: with SMTP id s20-v6mr35991771plq.272.1523243642556; Sun, 08 Apr 2018 20:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243642; cv=none; d=google.com; s=arc-20160816; b=XsDJ6oHTpfPOnnrcADKkTzQQgZdvIbU6Ucaz4LLQvmEnXle/IiYhPovHnolUGuMqqG 6Sgpvyqs7LO1JPWQytbwHRkM6ovHCvFjnGupbiNY/R4Rqxo9erZy9BLdIbTaE2Th9aR9 sCTMJqz3zW6huEwxlqqI/hw0pp6GezQ6zFV6gC69NnkmcLMdU8cXjOJCgrBnP3wx1UOK YTsNApKuqArUZQzBbAu6+1YWVbKwfCuJqToPLSMbi62oNQ8muGGABitxO76oBWE2tg9O LbHJfUXz2IbRQyzaIk2J3LxzvHcgbVzUxDsiFGwXAbK2mIUwjTGhD6EzQqJ7ZpvrLTAY V9fw== 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=R7YcmNcBEE1eoioD9W5aH+6Ulz86mk8Un9KohY4v7RE=; b=RmbRfEWgAHGiuwyUCoE8gMoLc82G086T/xAh+hsUp/XdSsyzB4WmaFi5hSUIn7json q1s4Rg06oKSsr5LC699fJVwNoLK4ghQrbnfcuBdC+7N6jizufaaB2a8nhP6PrpOVILWS 2nSewVO13ec4VSMri9xM4q0uRO6y6eGlweAEp5cz6tLkLGVyRAJQVAM5DlMPAbyA92Bo /FyE6Ay1Iyu1FNO0aDyLjZZ7rGgVspBgFRhajMDUpkKpVQnr39NMt9qTSe3dfDG1Lbae Rp+TpsjafgmsbxWEkzmPXp2G4p0NU9qaZfRI9Ti6snobltC9HZFjbogy+KOZzE8RNOQ+ v4xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=UM3cRCU0; 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 x64si12176660pfj.318.2018.04.08.20.13.25; Sun, 08 Apr 2018 20:14:02 -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=UM3cRCU0; 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 S1752854AbeDIDEk (ORCPT + 99 others); Sun, 8 Apr 2018 23:04:40 -0400 Received: from mail-sn1nam02on0128.outbound.protection.outlook.com ([104.47.36.128]:23328 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932106AbeDIAYt (ORCPT ); Sun, 8 Apr 2018 20:24:49 -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=R7YcmNcBEE1eoioD9W5aH+6Ulz86mk8Un9KohY4v7RE=; b=UM3cRCU09FHtLLRjK/Qf4Td7PfjGPpnApdIVDenNzDlq8ISESB2g3eCL9rGF6LBVdxQuvFoZnLLh+kQ9rArSoqVgUBW0E+tCc0bQ5gYNiJfeP8cP08ClQHiTvVG4VCwuaprJWQglOEYdLGiQebRZQ/i//FNkzjW0Va5XCx/DGws= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0983.namprd21.prod.outlook.com (52.132.133.29) 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:24:44 +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:24:44 +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.14 103/161] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Topic: [PATCH AUTOSEL for 4.14 103/161] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Index: AQHTz5isbFqLiJDs40uiRzNoOTvXYg== Date: Mon, 9 Apr 2018 00:21:16 +0000 Message-ID: <20180409001936.162706-103-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-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;DM5PR2101MB0983;7:YG2bNKiG3y2WNaRhjyJicX8V+DIyp/8q4x2mMkgTL6BFeUBRvfLPTUWsQ/501bWORsncAiIV83ldPTB1no8M9IiPL5EWy5JP13yPBGjYLvHDc7I2rGFVGxGcuSsHzaJawNTcXcktlWGOwmk7lyix76IUFwjjvWrPGU1m+A5bpRL+2+QgoO4LmGrjGsKfMVLGk0zBSt1kXCwopkkd0oWO5W3OTd0Vju4kVJfeLbCjlld75KzOho6RKAD6PS4KW4Wt;20:vUHvzy9NMbQVf4tVs5NiucXBu4/wpUbV/3k3Oj3gYeNdqUK8XKlS/lBIJX2fE3reuP/61Vl95c5IgziuTqfcU1wXWLZnqvSzH3fLpVrT2czlA55xIHYpG9fyp6pihtP6fHDZygD6afYHQI9JzzV2CLBbNBvaT0p8oqsD59U8VBc= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 2bb3ac5f-4559-4dae-7575-08d59db04afc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0983; x-ms-traffictypediagnostic: DM5PR2101MB0983: 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)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0983;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0983; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(346002)(376002)(39380400002)(366004)(199004)(189003)(478600001)(59450400001)(72206003)(10290500003)(3846002)(102836004)(6506007)(6116002)(25786009)(6436002)(66066001)(99286004)(54906003)(86612001)(6666003)(105586002)(53936002)(76176011)(316002)(486006)(7736002)(22452003)(3660700001)(86362001)(97736004)(106356001)(8936002)(110136005)(5660300001)(11346002)(446003)(81166006)(81156014)(2906002)(8676002)(2900100001)(1076002)(476003)(2616005)(10090500001)(6486002)(107886003)(36756003)(4326008)(966005)(2501003)(68736007)(186003)(305945005)(3280700002)(5250100002)(6306002)(6512007)(26005)(14454004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0983;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: hrYVL9+b7Vob9eAmO5OJ2/5C28osYJimrK2+rHfNRLOdYCszTjdJcAzgvfSffmuFoozMrr1G8QUNLtj6tU/bbiiQqAWnV2X3IMlRSut9N2GM2aMpHCDJhEANO6BRjCXqWVKQDxLXIAD7gCf5dLWICtHWHa+8N3HdRKVSeZmMRH4tnzkkjfglCG603t+uoaR/6YGiW0BToj3rrednLNLJYz014uETJHpdG+1BCTYEaAxs0FaNx1xm45/FxQGTfZY04PmlsnFluvfyTjeJibjtj1eG7oSLgqS+cjofpEFHtNkorvjE/q1dBWCUZertZ1EPyiaGoEjwe9M2DnefbbNdRGlydLzfCy82zTgvKI7P6dMrldqWmgXG/6+mq63fNTR7s2lYLV/zq2CGcrfZCxIzD2NEBcKZphaPX4tYgYw3zlo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <8A88818975C9B240905BA9927DAFAC37@namprd21.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bb3ac5f-4559-4dae-7575-08d59db04afc X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:21:16.2844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0983 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 LTAwNi5hbGkzMDAwLmFsaW9zNy54ODZfNjQgIzENCiAgImVjaG8gMCA+IC9wcm9j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xsIFRIUC4gIFRo ZW4NCmtodWdlcGFnZWQgY2FuIGNvbWUgYmFjayB0byBzY2FuIHRoZSBza2lwcGVkIG1tIHdoZW4g aXQgaGFzIGZpbmlzaGVkIHRoZQ0KY3VycmVudCByb3VuZCBmdWxsX3NjYW4uDQoNCkFuZCBpdCBh cHBlYXJzIHRoYXQgdGhlIGNoYW5nZSBjYW4gaW1wcm92ZSBraHVnZXBhZ2VkIGVmZmljaWVuY3kg YQ0KbGl0dGxlIGJpdC4NCg0KQmVsb3cgaXMgdGhlIHRlc3QgcmVzdWx0IHdoZW4gcnVubmluZyBM VFAgb24gYSAyNCBjb3JlcyA0R0IgbWVtb3J5IDINCm5vZGVzIE5VTUEgVk06DQoNCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXN0aW5lICAgICAgICAgIHcvIHRyeWxvY2sN CiAgZnVsbF9zY2FuICAgICAgICAgICAgICAgICAgICAgICAgIDE5NyAgICAgICAgICAgICAgIDE4 Nw0KICBwYWdlc19jb2xsYXBzZWQgICAgICAgICAgICAgICAgICAgMjEgICAgICAgICAgICAgICAg MjYNCiAgdGhwX2ZhdWx0X2FsbG9jICAgICAgICAgICAgICAgICAgIDQwODE4ICAgICAgICAgICAg IDQ0NDY2DQogIHRocF9mYXVsdF9mYWxsYmFjayAgICAgICAgICAgICAgICAxODQxMyAgICAgICAg ICAgICAxNjY3OQ0KICB0aHBfY29sbGFwc2VfYWxsb2MgICAgICAgICAgICAgICAgMjEgICAgICAg ICAgICAgICAgMTUwDQogIHRocF9jb2xsYXBzZV9hbGxvY19mYWlsZWQgICAgICAgICAxNCAgICAg ICAgICAgICAgICAxNg0KICB0aHBfZmlsZV9hbGxvYyAgICAgICAgICAgICAgICAgICAgMzY5ICAg ICAgICAgICAgICAgMzY5DQoNCltha3BtQGxpbnV4LWZvdW5kYXRpb24ub3JnOiBjb2Rpbmctc3R5 bGUgZml4ZXNdDQpbYWtwbUBsaW51eC1mb3VuZGF0aW9uLm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