Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754167AbdDLMt3 (ORCPT ); Wed, 12 Apr 2017 08:49:29 -0400 Received: from mail-eopbgr00101.outbound.protection.outlook.com ([40.107.0.101]:44640 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753313AbdDLMtY (ORCPT ); Wed, 12 Apr 2017 08:49:24 -0400 Authentication-Results: linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=none action=none header.from=virtuozzo.com; From: Andrey Ryabinin To: Andrew Morton CC: , Andrey Ryabinin , , , , , , , , , , , , , Subject: [PATCH v2 0/5] allow to call vfree() in atomic context Date: Wed, 12 Apr 2017 15:49:00 +0300 Message-ID: <20170412124905.25443-1-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170330102719.13119-1-aryabinin@virtuozzo.com> References: <20170330102719.13119-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0601CA0026.eurprd06.prod.outlook.com (10.166.117.36) To VI1PR0801MB2734.eurprd08.prod.outlook.com (10.166.198.27) X-MS-Office365-Filtering-Correlation-Id: 172be722-8dc6-4480-abbb-08d481a256f8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:VI1PR0801MB2734; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB2734;3:sai7MhkhSdYo3Qv3htTCkR1zoQ8EUBEmCyB7KlllKRzO2iW2g7lg1J7mBmc/sTCpETGib2h13GAnvr9fs3+2MX3WWKNDcr0+ItBSvK0v/zkE+B+/67s4OvUG4pWhD5FvToI6nrUNGqO9DaYZk+XFYA5rCIbJ2Lr0AU219rYs328yBn0RrBjltXiQY4/XIFr6uUVjB8aTY6n0seyvcnF7MVYgAXrdr4bIjOwdj61l+XAE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ipfHPY22kxDoraCHC+x2SngksgAvlnVTJhwUscKQBCcuDz6XGfUZWpXOUahFuYDgf0se/fv0erBWagE1wheD2KSmg34xclKpbkXWYmECaKZ8kDvQDu8i5z3hBllCvGUK+2qT8DmqWr+DNhE6Jpm8arxGeHIauiJGBCAhWK8TmqD4uyOsRmODWofjLDXqalSzGtJBhcqK04O0I8Y7HOTOhDkkoD77+Z5GgqoF+Mhtq//ju9uZd4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123564025)(6072148);SRVR:VI1PR0801MB2734;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB2734; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB2734;4:RHW62XoZ4Yzl6+XtoiFuZXPTJoIJ5bQt6QMUTFsAxSngaD6zzsXzfLtYWbqi8K15W3t/KwSk2ypzSfTTfnoyJt5bve01Wcac8WfaRU3rZRuZGxHuIJai2Di+BxG3L4IK5KUyBx+kMdsnWitNlCcfV3BepDPIXHo/O1AXR9a1LFp6Ng8GnnMpn+kJJyBf776BOhVx22iFEbSyWpEy/R2287Ozxr4BMX0ke6AMXx9ndUbyg0JRuuiOexmcDuojjiMuKthH1B7UsRJ0IRlJ40WYLKDmDrMcoQjLMuY5nhzPpnjbCu9kqpU17WTtZV1kEYilOGKG/2d5Akdu1xQUQtUtHcquZvRN8/GyC7FywjsiUyQdX9UdJRI675OcEIgE7ElG6tt9Ldbkxl2vywmYCFfb5iONnpY7b/wXfx+XZU/2GNFQMjSStPFkjaXd9VFVIBEzscniENxlGIOpnzhriJ+ftH2gMito4JtzEsq6a1iZDFRQAPKIGbGMRbk/vFxxeECKxgRnPJ/Sy+1o6esWzcIHD7oM8PlLs5smsV7T/FJVR4MXFxsRsXPW8m8wyxNRZQ77QfFKX55v+gJwKxqPOWfK3842hhbRmuE0OV23oahSqe6sDjL15bW/84J5+cypEhNous06p5EqlRRVC+rV4Swboe9m0/GULyXaE0GBjxHAidDzXHnnYCYusSMgRTPsOLRkxv2CqOnByivMGk+qKwsoxA== X-Forefront-PRVS: 027578BB13 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6069001)(6009001)(39400400002)(39410400002)(39830400002)(39450400003)(42186005)(25786009)(53416004)(3846002)(33646002)(6116002)(76506005)(305945005)(50466002)(53936002)(4326008)(86362001)(8676002)(5003940100001)(38730400002)(2950100002)(1076002)(6916009)(2906002)(50226002)(189998001)(110136004)(48376002)(6666003)(6486002)(5660300001)(6512007)(36756003)(54906002)(6506006)(7416002)(81166006)(50986999)(76176999)(7736002)(47776003)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB2734;H:localhost.sw.ru;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR0801MB2734;23:ii4Fv2kAFBppnCd81an4nvdvBdYY5KjZKDNzf2J?= =?us-ascii?Q?kPa8dL/4jfy9NCEqa66ergS6PtYC+0auZfbuwUZAWe4D0gyTTFCgLI0oKNCE?= =?us-ascii?Q?bvQ92o2nkHsRUUsCFRDTWNpR7d0s8StGD6hkt9WX9YGBLD0b7Q03ugcbS1u2?= =?us-ascii?Q?ptO83bi71YkknFDJksXGAO9/+Br0VUPqXPtkFErIo6Fo2gwPFtNm7b1mgeeM?= =?us-ascii?Q?1SLHTw6/VVr+S8tHoXxYzbPoNeZzia10LrbZGENWwHXi3sb6YR9M5OMk8bgG?= =?us-ascii?Q?UGjoxEhWQlXIKbydGNdQ81doYF5qoaznZ7vKTQCs1kE4Rn1HjH58gp0HXacF?= =?us-ascii?Q?ynFy3kD6V8VdC7SEfBzRco8+rR5M5qWpt0zkW/BUQfmWKTyIYDbYOLdGUQ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uyyEyM/xtWCTOnc3yZoGHArr9P1TLbb02/pbK2inQzT3CWAAje991H1E9xxaFwtGcoEP74Bw0ogQxs2owMWlUvawoNpD9dhrisxZADUMWfdnAYtsZ+ha6RM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2017 12:49:19.4123 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2734 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 645 Lines: 21 Changes since v1: - Added small optmization as a separate patch 5/5 - Collected Acks/Review tags. Andrey Ryabinin (5): mm/vmalloc: allow to call vfree() in atomic context x86/ldt: use vfree() instead of vfree_atomic() kernel/fork: use vfree() instead of vfree_atomic() to free thread stack mm/vmalloc: remove vfree_atomic() mm/vmalloc: Don't spawn workers if somebody already purging arch/x86/kernel/ldt.c | 2 +- include/linux/vmalloc.h | 1 - kernel/fork.c | 2 +- mm/vmalloc.c | 52 +++++++++++-------------------------------------- 4 files changed, 13 insertions(+), 44 deletions(-) -- 2.10.2