From patchwork Thu May 10 09:52:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10391521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7096360353 for ; Thu, 10 May 2018 09:53:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E9E21FF13 for ; Thu, 10 May 2018 09:53:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52F90289B7; Thu, 10 May 2018 09:53:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABF8C1FF13 for ; Thu, 10 May 2018 09:53:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 913FD6B05DE; Thu, 10 May 2018 05:52:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 89B326B05E1; Thu, 10 May 2018 05:52:59 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 716F36B05E2; Thu, 10 May 2018 05:52:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 2C0F06B05DE for ; Thu, 10 May 2018 05:52:59 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id j14-v6so910948pfn.11 for ; Thu, 10 May 2018 02:52:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding:spamdiagnosticoutput :spamdiagnosticmetadata; bh=6Lv+JfRhmpiB11xmNRi/HUFuAWVUELXj+iX52Hpqp+Q=; b=MRHfI1WB1qz3wvuqpmJsBmUN7c+2352klP9pFhwLpOQCwPtTYnuQkmTs3i94pbISDM xvz9EGnaA9WygZhvYEwvRjplrdWkQzzs4KQsq29StoC1ftGU1jOD3yPVHQ+2JJvSCzwU YVCdB01ThLhuQ1r5U0d+0fbAnrG+Hz6Or6w31V1pfQDBXepzzj5O78drT8YHi3Dx4aPb /Ln0nkvhIXDPLbH9BWuUBEQUj6HuYw59RnD/UOAKrn/fj7zxKgi5ghYdA6LMDQnOyS21 T0QDl3+H+ojUHeaBDjFWCWZ9l8Y5mEjalPtOSc6pWaWFrFHznTV2TLPfV36IgLsfuiEv lJBw== X-Gm-Message-State: ALKqPwfNba8OUK2oNcLtz8UV6Q2sa2YM088cw1j1BVDIcsSt6cNWIydN sXZ1utkr45mID0tOhIx9Ugcrn6MGgFFKIM97fQYA27e5XXeC9i8JcfnJ/Cx0WXIxLJgJz7/b5UH Zw3hZZn173FRy7LSLdQ0A/gZvlAFNPZyeZC9fHg5iyugTF5WGY3tq41IHrwqnQjP96A== X-Received: by 2002:a65:5843:: with SMTP id s3-v6mr590486pgr.323.1525945978869; Thu, 10 May 2018 02:52:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo7o9+hXZfulqlUM+JpGQmJ0uTd/6p++FsNRSBPgNbHSbXn4j0pYottqhrg8rpeIY6d6qBF X-Received: by 2002:a65:5843:: with SMTP id s3-v6mr590449pgr.323.1525945977910; Thu, 10 May 2018 02:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525945977; cv=none; d=google.com; s=arc-20160816; b=WiYFwBh1lxJWwqy2HsuMVbQUf4RxvStrcxNZxlwOLK/1Ms007BP3RrlDcld7E0PvF1 zBYD4rfHeVUBiQuqtMq6p469rv+0QsjjlmLkXKL/XGB97ZHKK09DSUpenB0GPOw9i2FK i5WLamo2ITdWSqXmbHEASyf4yqhTjV79MzzCq6h+2eu299v8Z57JcSkec9bUCV8fN1kB ZGTIr5FkpDZ3sqx8Rpxt8IPKD6QkDxtk+wqy0wZb2QsIEDCR9mqYFcq9s92ixWCzkGmd tbekN1h2TDG9o8gB4QmdEWuQudtyop6J+XQkjRrqpKGkJKIYaLcbK4tthUvyYdoGeqtx HDIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput :content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:to:from:subject:dkim-signature :arc-authentication-results; bh=6Lv+JfRhmpiB11xmNRi/HUFuAWVUELXj+iX52Hpqp+Q=; b=zhd8IkPHX+EO7gJpR5my/kgyHY3FJi91OvW6oU0wTy0UwMH0tT6LA6UAr028zRJy0O ECzLm/KgZmJErzWYKGLdsQTixl8IcqxKca9S04joRY0EhYQmeuS96+ZS0Q/xl8A8gsJS YW6vum7VC/N/i2+xnbvwSWH9f1R63OdXwJ8jZKMtG9lq8C7mUpDxPi//bDiM8Wo3cKzy 5Mp9R+ASzAVY2FGfy9oRR8Qsg/iffdpwyG/rxouCvGAxHkzOLni87mvDn+BSHQpwi5Pe ppT4t6vCjvzHOlEyCkJGajCV+/ht8hebYdSfEls2afDpP9/215DNDzSE2eTNLtcJWWix HTmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=GjgsvHd4; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.129 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0129.outbound.protection.outlook.com. [104.47.2.129]) by mx.google.com with ESMTPS id w27-v6si370628pgc.645.2018.05.10.02.52.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 May 2018 02:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.129 as permitted sender) client-ip=104.47.2.129; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=GjgsvHd4; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.129 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6Lv+JfRhmpiB11xmNRi/HUFuAWVUELXj+iX52Hpqp+Q=; b=GjgsvHd4NVziPtBenvUOQGL/rk8bjl31/KrlxclWMZ1FpUhujAuTAzrVhMXVlFXwBGLo456kSKVwbWm/CnDNjKum0A1qANMYD/at5zL1VeFDw5aLlLklcQuh8UAs/nHv1YejJ8ubn2INhxN2Jbi7TITzy63QmRoNovxzmtUBUo0= Received: from localhost.localdomain (195.214.232.6) by HE1PR0801MB1339.eurprd08.prod.outlook.com (2603:10a6:3:3a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Thu, 10 May 2018 09:52:50 +0000 Subject: [PATCH v5 04/13] mm: Refactoring in workingset_init() From: Kirill Tkhai To: akpm@linux-foundation.org, vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, ktkhai@virtuozzo.com, tglx@linutronix.de, pombredanne@nexb.com, stummala@codeaurora.org, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, guro@fb.com, mka@chromium.org, penguin-kernel@I-love.SAKURA.ne.jp, chris@chris-wilson.co.uk, longman@redhat.com, minchan@kernel.org, ying.huang@intel.com, mgorman@techsingularity.net, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, lirongqing@baidu.com, aryabinin@virtuozzo.com Date: Thu, 10 May 2018 12:52:46 +0300 Message-ID: <152594596685.22949.8660258274427608623.stgit@localhost.localdomain> In-Reply-To: <152594582808.22949.8353313986092337675.stgit@localhost.localdomain> References: <152594582808.22949.8353313986092337675.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM5P194CA0023.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::33) To HE1PR0801MB1339.eurprd08.prod.outlook.com (2603:10a6:3:3a::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0801MB1339; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 3:K5lK3+uQ+y6CF0d9xdlXXQejXW2tv/HCwokS37UpWmFyc4xQcaoEuy4vpQk8XzSMTBeR7koeT2KpD9WgdeyMQV+HRy0Wu7+D6QyzIvD6+7DIsiFZOheEHa1K2JPIBm/q35A0ChsvByr+CZg6B3JWSBGkKvotymxmlHWEMC3sHamKSYfwjKQGKi9Lc3/K3RZ4eDk40ucnJrCvxFH/vls9zUhBOy4QQVJHWcgC4fpf8u2K1Gft8DxQG3MOIPcMHevT; 25:8qNRAfd6JjiAznSW1ujRnd2Vt1n81o1obt+0NlNyef+1Q8YB6nagAqVnXQYyRadtdIfwDY8WYP+2z8V+6AEmXanNbOwTBVYCmMgAte0dx8cMlbJ/fa/WY6fuwvEbhXq/WMEURUjNpiq+jv482EDGDH+cMA0Aa/J8geiCxA7XNJ43s6O6JJNPBr33fEUOAwQdOZJpByUEwf/OSEwTMmF7wMkVghtbJKN8huukKuK5yoQjgkwqxqMxyvqm+ndh4oTQognDa8tBKl/xVGvshwN5yJmX/Tvvb1v5oqgIMBxMmcKlXbTlH8JwhzkBFECnVqvBUHLIrxmubnpMfDCO1IYpLA==; 31:rkQUUZG1pcO6Tm2DD/PK7vkVu2pg2YNFV3KNz44aA7LQcVcaIEAzGOChsCPj8yGpHGxAMM2VYGblWzwj2/NouFngXnoYfynopUDRJrNELGlbfVA3CNkaw6wmZ6mjHn1zlAAqCjuUf6bNzgWsSGsEG8/2gK5gjrq8df16g0o/X9UFNDrbmSgPmkOS95mpuH7eaFhng23/G7Z0HU9kqPSGx92rlfnTmOHfjNEev+GgyH0= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1339: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 20:BKVMJ4MrKVL2Uk1sw4Ff2VeudTJSe2xeVJUW21MZARWpTgE5+TQHtc2Awz+mCjMwN9zkXOmCUrN689slYhzXqQ5llqOlh0wLzieasDs5vioJZt0MRSdPa+HgS1MhMJOGoL+QOxPQcV4Pc4/GvNRNqRg8AUUHLP4F5DswTvfXUbauTXIyR1NUmbmupiNKW+wBcUauPNNglivX0UFy63e4n3/U1c349t7bfcDGbyiuLmaRe3NcDhHdBAocOz5XM9odqa+ZjWtdiHMBs/nwX3qlGO6gJGvBKPZPSQIJoPz3sgBVWwjLfM7AK74+GwaLZy5s6C+lhXIynQ3d4Yc2CzFq6PH/HvMua4ZGfPVVMlSC5y7hzm38WrDPnoMUT7f0ZFHbgB/Kfmv59krnJRodDFh1Pv0VEPpyq9lPJPVe5ZxqD3QJ/+pC43NiQ7ZdacX3VN1mOa5IeI6/hO9vZBf4v1iWDOG9BIo8mT/EXMf6qOu9Bi7GIZRHceL2Re8x69hOcZLj; 4:2BIfU/QaPL2BdKeqJwMlL19f11EFEuqKR4QRSdqlVgSRIPAITOCJ1guxJ91U6d1q3w+jm30I1d12DvF/xswaPnT5uv6Da9lkA4jr+kTl0NnuUS4i/6KQUMf4g/QYjo7eKpERz8GP2aOAhq4FNMM750OJ86yaE1FEVN9AXG0leiX0CVHywtfvh+nT7yQceGU6RVIUYX3bKnKFqEwQmJSxSiQXHn3RllLmvk0XIR+rKb8OcSOnRWaAIJDI3qc9OfEAkNlF6l/b0Xt7e8ePvMafuQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR0801MB1339; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1339; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(346002)(366004)(39380400002)(376002)(396003)(39850400004)(199004)(189003)(316002)(5660300001)(58126008)(52116002)(7696005)(7416002)(25786009)(7736002)(2486003)(478600001)(186003)(26005)(8936002)(106356001)(305945005)(81166006)(105586002)(76176011)(97736004)(103116003)(23676004)(16526019)(8676002)(81156014)(55236004)(3846002)(86362001)(6116002)(446003)(11346002)(486006)(230700001)(66066001)(476003)(6636002)(6666003)(956004)(386003)(53936002)(6506007)(9686003)(50466002)(39060400002)(68736007)(55016002)(33896004)(2906002)(61506002)(47776003)(59450400001)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1339; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4MDFNQjEzMzk7MjM6RnR2ajZGY0drNTl2aGRJekRucjljSVhh?= =?utf-8?B?SlV0UFB4Y1RwYmd1MlJKQmR2VnhZZG1tbFZKNDE2eG9VaGxSdlZkcFkxVnpK?= =?utf-8?B?VjhJWnZrd0FhcXBMUit3WC9NV05tNEc0L0VIcDJZeHFKMlFVbGp5bmwrNnkw?= =?utf-8?B?c0VQaVdRQmhlYSsyQTRwZTVUL3NzeFdIaGFQeE4vc3RBSmozMWwweWwwRnJi?= =?utf-8?B?UnZTWS9FMExiZEVvaytDMTBhUFBzQzR0ZmJuVTFDcmtQMUxLUjYvNlk2VXpG?= =?utf-8?B?QmpNRFpGeUJuSjluY3BnSEt0MTNnTzg0UUk4K0ZaUzQ3MnY1V0k0aGdZckg1?= =?utf-8?B?eWR3SDVkZjlMRU9zQ3pQRFc5b0J0c3ZKK2Y0SmoxeGV2YzFLZ0xsVi9JbW9V?= =?utf-8?B?Z0x2SEt4L0tKWVUreXU5WnFrdTJ5SmpmeDlFaVAyMVM0TnJwdk0ydVpVcDB5?= =?utf-8?B?VGRiNjVja2MwU29wL1NEWlZsSE80T2p2aVQrVmtMYk1ST0ZjWEl3Y2puZG5U?= =?utf-8?B?SzJPN0N6ZWZTK0huY2pMY3VWV0lrdU9POC9CUERKNGw5R1pBakNOOERaUHZY?= =?utf-8?B?K21oZzRrZ3h2bDBuSFg5T2RHeWxMU2NtTEpUL3BQQjFyaUxaVVo0NmJsbHZ0?= =?utf-8?B?MDg1cUxwbHdwZGJ6TmJ2b0hiM2lobEFOdGNQTnlZcStjaDJ4VzVXK1dFcjQ0?= =?utf-8?B?Y1pkYUZaQk9MVStkTSs4RG5uVHVKVkJJ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2E/KsnBxVKvVsE/+6nlWnB9sYKD3HlQ/aAEcuwM76/VsbVwVKJDl1rNROOgtObtSHNm6dHwPpB6QC/WkvAHqOSEULUp8U=; 24:ea1zaAwZaFdOYdUzz53WnVwJOgZoSZZlAJm9xXK6CMkQ46qAiWWUO+KmCPKp8gY+C8UR6o4jZ+iQzqMp0SCWUpDKtwe0hTo4ahx0G9TC8Bw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 7:nNxTsE6xStF23j2+0IcNfRdi6NkZOGiCywMektaF2ELDVHp8u9fW5JD5P3pfec8Y7xTBCVzp9GpTnWCUaKcWiw1UqQq80lZsAUatfY3Ux0qMRLhY8n1dhI0+ut0ZEBIHKEnUTnmX2vGMCHQ09F51jpmYeXR1LR9sM/Dz1M35YKgE1bvatH6NieSnfU2WMSsAHW3zxdwUBccjTRw6/iPS+xGyBweFN7OiCXOlJBjMQDb2j0rUrDcXgwZp8y7vq3ak; 20:WhUEPdecflKsgRCj9g2yUNbPRaCiiIu6xRjelYtxcki2PH7oAS2QEy50uJaMRCVDjvBb5e92cuv7RBmRCr374HH/CXfPUUPollaRapCfL00NY5lBXVkHEIs+/aXVhKeoF88ROZuRc0oCuPdyjFvoWO0pLP2kpDB7NBuXxooDqyA= X-MS-Office365-Filtering-Correlation-Id: d8a5e98f-2bc4-4e7b-ab88-08d5b65bcc53 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:52:50.7544 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8a5e98f-2bc4-4e7b-ab88-08d5b65bcc53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1339 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Use prealloc_shrinker()/register_shrinker_prepared() instead of register_shrinker(). This will be used in next patch. Signed-off-by: Kirill Tkhai --- mm/workingset.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/workingset.c b/mm/workingset.c index 40ee02c83978..c3a4fe145bb7 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -528,15 +528,16 @@ static int __init workingset_init(void) pr_info("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n", timestamp_bits, max_order, bucket_order); - ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key); + ret = prealloc_shrinker(&workingset_shadow_shrinker); if (ret) goto err; - ret = register_shrinker(&workingset_shadow_shrinker); + ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key); if (ret) goto err_list_lru; + register_shrinker_prepared(&workingset_shadow_shrinker); return 0; err_list_lru: - list_lru_destroy(&shadow_nodes); + free_prealloced_shrinker(&workingset_shadow_shrinker); err: return ret; }