Received: by 10.213.65.68 with SMTP id h4csp2119072imn; Sun, 8 Apr 2018 20:10:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+mryu4fFBBZEbL2Pm+8uwhbW3AmR/iHAGJRMAblxzoJcGp97u/dGag4ZGAlwXX93lUmfwO X-Received: by 2002:a17:902:7c0e:: with SMTP id x14-v6mr6906205pll.51.1523243436144; Sun, 08 Apr 2018 20:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243436; cv=none; d=google.com; s=arc-20160816; b=Pndqv2iiu4AG6543YPHfTUHFrjeWEhSdUNDODu/ONA32tMgpHscBykYpKcqx7Wzv4/ rSMqrPMLJhzJOAZkyksn+1e4HACYHLWD2BD04KOcyuP/kLqmT2MO/wHECymUjT2FnTGr p9Ij/hs81H5ZUsvwS9egqNwxvLkfos87lB4Mh4o1Qr81A15dKPBK58xRuXHbhT2OaDKV ifJY3mQaGHiH5TTEDpc7XinEcCiPhQp9jg8C5stTw1OFRVRtWsOoNarqY9lagaJ8NQ2w i6ZeMXCRNs3ZIkD7tXNb0MREfoneDWBZYI3dyNNhx7VIUMqAA10sDbYYY4acJY1jfMHR tpOg== 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=MOyvdU8tBaU3NGuTdXQ711oxb50VmP6OkEW2+3qFE3g=; b=YhFWgqLPheTPVdDMyq71njuLM7DpsN/1vgx4ZVOz/+xOum/fvt64+jkuTv5GdFcDXn 6hFmiJyEnAj4n6gfpW/KYYIoSE9tRwCfVjo42vUZsZwRYYBxRZyZXD3Bf8bJLOOgVpbi QhWq86r9qhFEAf9yACUUoOblYdeAevoPHfax+gxBJl2hi1qtlTjpcDyCnGa59IJn5BpP paNv0QO73WKe326M6mIWRJkQcNEmcgEtIfjNEhUKBH4xjHzESstUeyjkUH1kBCRCkA2w Z9GBOZkgrCRCtwEO11fMftv5zoJqmQmWb1II+Si1SRVfBifRe6lF0wg0Y/Ral3xhW7t8 w4vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ll4QnWM0; 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 x5-v6si16246110plm.443.2018.04.08.20.09.58; Sun, 08 Apr 2018 20:10:36 -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=ll4QnWM0; 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 S1757201AbeDIBst (ORCPT + 99 others); Sun, 8 Apr 2018 21:48:49 -0400 Received: from mail-bl2nam02on0126.outbound.protection.outlook.com ([104.47.38.126]:40576 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932392AbeDIAd7 (ORCPT ); Sun, 8 Apr 2018 20:33:59 -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=MOyvdU8tBaU3NGuTdXQ711oxb50VmP6OkEW2+3qFE3g=; b=ll4QnWM0MY0cizlgJcZlz5swF9Jdg5nk2FBzm0MkSVseIlGsRlLVNiYYqOtE81Ig22nTKw4aPMTzS7WJJYVhDly5O078N2gVUg3rnYNqfLznZJeiiIxGxsqOU5+iukqwGWf4ednzfmNj5Qi4yMGvEE9+hCNSK/Ur/6IWCuXXRC4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0984.namprd21.prod.outlook.com (52.132.133.30) 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:33:56 +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:33:56 +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.9 261/293] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Topic: [PATCH AUTOSEL for 4.9 261/293] mm: thp: use down_read_trylock() in khugepaged to avoid long block Thread-Index: AQHTz5lgWyiIwSaQ90uhGvRN0Nmi5A== Date: Mon, 9 Apr 2018 00:26:18 +0000 Message-ID: <20180409002239.163177-261-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-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;DM5PR2101MB0984;7:QGiQf3dDPrwyL3EoUmkwtVu7hXKHHYXT86r846m5PA7udANZb4KIAUPRgLVQXAdvqoDzkhvbJmnLdr3t2Vg1+mRoIC3lD/P0LxF2eR6Chjl/ZyZSQYIf6KFtakYbqZOjWL0rl1i3vI/b64lw+pIiwjBGMO8Ga+t/cc+AgSgleE0ehbWXoJ1jonO3NdWmKb33INzezIgcE6qV1mIo03c3jmdP3OFBKqEy9U9VVlZ7ajYnYaGP/JYHMHYvoOVLphXB;20:EoVdNdbP7NT6KmkL90HpifbQOL3VBWCTB2HlWqEAi1t5isATC3haUozrAfRpKvY6nLBSh9g/M4Z1yXjNdIf8YGLwxnMBRjOBsyLgT2q/FKg4LsRvcXyJHIBwN8XKcJIhqfGCG/0wjL1bHnzffX/IbIyELPMcaNsc5s+Z2+6U9ag= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 181510f6-69bf-4da0-8395-08d59db19426 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0984; x-ms-traffictypediagnostic: DM5PR2101MB0984: 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:DM5PR2101MB0984;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0984; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(39380400002)(346002)(376002)(199004)(189003)(26005)(99286004)(2906002)(14454004)(97736004)(59450400001)(8676002)(81156014)(81166006)(8936002)(6512007)(106356001)(76176011)(186003)(3280700002)(10090500001)(36756003)(6506007)(66066001)(3660700001)(72206003)(478600001)(6666003)(53936002)(2900100001)(105586002)(102836004)(966005)(2501003)(110136005)(54906003)(5250100002)(486006)(1076002)(25786009)(6116002)(6436002)(11346002)(6486002)(22452003)(4326008)(446003)(7736002)(86362001)(305945005)(2616005)(476003)(6306002)(68736007)(3846002)(86612001)(5660300001)(10290500003)(107886003)(316002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0984;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: G5jbpM08btZ8MZLjy66jaY40GZF6JxAu1SaJ5H/JdiRjBtgM9h5Loer16lQ22ZnAiGQj6uMo+mYxlCqJa9JNR5c5XKno/CWadtGODjyZ73OZJfasUtozwaBHweYRzYACbaEfLKJ6SQm3bCzksnl6QVXmG8JfDQOVU8LMWDg1uiZ/5H/m/p5idl/ZwJg9QTs6mI76FmNsT7+bih7hswggaT2+olupX6sP4OWZXV73FypH8KoKG4MfLLDzqpbcUkaGkFXoifdD9/O14jN642pvTMkgjNUB01n4VUpWzdMzneiOdb6ZfpbEEbTteEklqTnP5WncmbE8cS2bt5lItub8y6Ky3q4WTadQYrZAuoB+0iT4ASzF4APuYVQkjbhM1rv4CNxCj8RV56uGVmarUcYZ17/8BkgIDZK8kBc+D2f1mM0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <11CA123070CF6B44A1238976C5FAD146@namprd21.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 181510f6-69bf-4da0-8395-08d59db19426 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:26:18.4569 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0984 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+IC9wcm9jL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sIFRIUC4gIFRo ZW4NCmtodWdlcGFnZWQgY2FuIGNvbWUgYmFjayB0byBzY2FuIHRoZSBza2lwcGVkIG1tIHdoZW4g aXQgaGFzIGZpbmlzaGVkIHRoZQ0KY3VycmVudCByb3VuZCBmdWxsX3NjYW4uDQoNCkFuZCBpdCBh cHBlYXJzIHRoYXQgdGhlIGNoYW5nZSBjYW4gaW1wcm92ZSBraHVnZXBhZ2VkIGVmZmljaWVuY3kg YQ0KbGl0dGxlIGJpdC4NCg0KQmVsb3cgaXMgdGhlIHRlc3QgcmVzdWx0IHdoZW4gcnVubmluZyBM VFAgb24gYSAyNCBjb3JlcyA0R0IgbWVtb3J5IDINCm5vZGVzIE5VTUEgVk06DQoNCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXN0aW5lICAgICAgICAgIHcvIHRyeWxvY2sN CiAgZnVsbF9zY2FuICAgICAgICAgICAgICAgICAgICAgICAgIDE5NyAgICAgICAgICAgICAgIDE4 Nw0KICBwYWdlc19jb2xsYXBzZWQgICAgICAgICAgICAgICAgICAgMjEgICAgICAgICAgICAgICAg MjYNCiAgdGhwX2ZhdWx0X2FsbG9jICAgICAgICAgICAgICAgICAgIDQwODE4ICAgICAgICAgICAg IDQ0NDY2DQogIHRocF9mYXVsdF9mYWxsYmFjayAgICAgICAgICAgICAgICAxODQxMyAgICAgICAg ICAgICAxNjY3OQ0KICB0aHBfY29sbGFwc2VfYWxsb2MgICAgICAgICAgICAgICAgMjEgICAgICAg ICAgICAgICAgMTUwDQogIHRocF9jb2xsYXBzZV9hbGxvY19mYWlsZWQgICAgICAgICAxNCAgICAg ICAgICAgICAgICAxNg0KICB0aHBfZmlsZV9hbGxvYyAgICAgICAgICAgICAgICAgICAgMzY5ICAg ICAgICAgICAgICAgMzY5DQoNCltha3BtQGxpbnV4LWZvdW5kYXRpb24ub3JnOiBjb2Rpbmctc3R5 bGUgZml4ZXNdDQpbYWtwbUBsaW51eC1mb3VuZGF0aW9uLm9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