Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1893392imm; Thu, 9 Aug 2018 03:59:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxEeDtC8rgfXw1izYBxp3mxFkFD5nKYOFUewvkq5WVXDZLlzoJXvlB2Cs+TI+Fb0bZtvGiK X-Received: by 2002:a17:902:9687:: with SMTP id n7-v6mr1588069plp.33.1533812379857; Thu, 09 Aug 2018 03:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533812379; cv=none; d=google.com; s=arc-20160816; b=zeGhhQVhzdW8/IvPUGTWL6nL/L6F24PI/7rCrJpWCWbFsmJnxOwUhu/Csmrr3hFj6E EUAFo8CYcbRHBVuT2bRE8Y+GlgsW4jfZopWTX2tarlkrOrTo7pPmpPz7gPOtu8IM1XB3 Nr2YgN1uq0xmZZHGGYUZy9x00R5EILrdmOIWxUIziFdOGAL99CBAmyAFfhmV3HjSQkEO B7fe816v7Dgu08vHmdsixV4PIId1Snckaa5xE8wHX1flBN1muh5Kl8X2iKUkjlTHXa/S 5HZjn/VWD8BMI3f5xQCu/LJjguOxixjl84kAwYALXkq6dSDf//K8jVzvShy4fRQvAiBs /ZhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=9le1J8UQ74sM62jqDJ7uvE/rFNiqkhjvOkRk0KjxewE=; b=atZCE8NgQVG+0gcISKUqiNQuiYEWmr/LPn5HYv8uIGjafPLCxYA/qxnotvBbLhpLlk KtrmjKp9sCUUI+jO+nARzUUT+TfGrXtwGqY2uK4lREy3vlgs2VR4ip7gCOd01p47DqKs l/R8ch8BLOtT6K5vlSF7oKU5fRuuWDXcmLRa1fcpdIg57dPWVIfliqdobBeLUl2Shhpd hZ9X7WV+XWMnviSSc1cA1I+639bsYYhm+/QZmHh43ZU2UBUt7/bt8szIQEiiKDfCjhjF lwr/WfMO8YRpQ81CbM0GuCjoz7HagIPX+/XDE5Y8d2wQhlGlKNNoEaxOZvkm9RJq4h72 y5Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=JK9aUcQW; 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=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28-v6si7160476pfe.265.2018.08.09.03.59.24; Thu, 09 Aug 2018 03:59:39 -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=@virtuozzo.com header.s=selector1 header.b=JK9aUcQW; 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=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730316AbeHINWz (ORCPT + 99 others); Thu, 9 Aug 2018 09:22:55 -0400 Received: from mail-eopbgr10123.outbound.protection.outlook.com ([40.107.1.123]:35260 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727768AbeHINWy (ORCPT ); Thu, 9 Aug 2018 09:22:54 -0400 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:X-MS-Exchange-SenderADCheck; bh=9le1J8UQ74sM62jqDJ7uvE/rFNiqkhjvOkRk0KjxewE=; b=JK9aUcQWHZCV69QmTiBEjyax4piBivEWaFaZxzvCiWZHSx85TfAJI6iFamr+Pc2kD0GOEqwY/tYqAqG3babmGnwYFO7aXEwhsWOEIz3BE40ZkJzzYLeLUuqlnQgWI2pf23o91lko8cGursLHlfj5PA86phorSvVXmOnwalZGYIw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from [172.16.25.169] (185.231.240.5) by AM5PR0801MB2018.eurprd08.prod.outlook.com (2603:10a6:203:4b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.22; Thu, 9 Aug 2018 10:58:20 +0000 Subject: Re: [PATCH RFC v2 02/10] mm: Make shrink_slab() lockless To: Tetsuo Handa Cc: Michal Hocko , akpm@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, viro@zeniv.linux.org.uk, darrick.wong@oracle.com, paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, hughd@google.com, shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org, aspriel@gmail.com, vivek.gautam@codeaurora.org, robin.murphy@arm.com, joe@perches.com, heikki.krogerus@linux.intel.com, sfr@canb.auug.org.au, vdavydov.dev@gmail.com, chris@chris-wilson.co.uk, aryabinin@virtuozzo.com, willy@infradead.org, ying.huang@intel.com, shakeelb@google.com, jbacik@fb.com, mingo@kernel.org, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> <153365626605.19074.16202958374930777592.stgit@localhost.localdomain> <591d2063-0511-103d-bef6-dd35f55afe32@virtuozzo.com> <4ceb948c-7ce7-0db3-17d8-82ef1e6e47cc@virtuozzo.com> <20180809071418.GA24884@dhcp22.suse.cz> <7b746367-e4bc-0e64-4e27-14fd7f06ba8f@i-love.sakura.ne.jp> From: Kirill Tkhai Message-ID: <2e1cdec3-5133-67ec-e929-8bc174574b3a@virtuozzo.com> Date: Thu, 9 Aug 2018 13:58:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <7b746367-e4bc-0e64-4e27-14fd7f06ba8f@i-love.sakura.ne.jp> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR0202CA0014.eurprd02.prod.outlook.com (2603:10a6:803:14::27) To AM5PR0801MB2018.eurprd08.prod.outlook.com (2603:10a6:203:4b::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c5ab1ea-6de7-4f61-0e66-08d5fde70688 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM5PR0801MB2018; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB2018;3:HoNXHtnEbs4oZ3dsVf6C/qf957Aaicv4T1j0YwiR1OHaVJXnNmiwVaB8cN9TveUNQCM384DikUBDUZWyn/yyf5hRC2CZDN310ZdNHJ/YJU/wvkSJa7dVjmU+IgvdkgkYEP0aD66eZ9hy2fDC+7tlNvYAPcBi48Of4eChW4SM74Pl0/AMhJ0R6l441sqEsshGgUM0ltCZxPmFVdT9Ac+CFt9odOlnbAOgaabFKo3oqIPhbIKEwNy3Npd7Ua9NcBSD;25:U7Iwmg4/cMcefHh5BxEXyttQQVLZvVpkB8wE93JG37xr3JUUWSn8O+NiC2AZGO6lF9Vt1N1ELOFErnilPxGOrdstTbFDO+zlyecACNE1Hy2x+UgD8K24nCzHxsUCKxn6hRhwDk1Q68XJ/ZXyJF+arBI9o3KDogIFc2HCpV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S7hRMRKHe28Bfn04GtxFWCyLXDntRl2LxgMQ9vLfrpIGrN4G5noveHLMbgRkVtd8mEBQ3bEl8kaaTWO6SEudkuH+BuY/N9ulR++3OQFzVn+bWMJAoc38jlyVdem73AbhaYFc6CNdvpZJLSoMBn8Y/dX0QV+JObYxDRBmOtylYsHPNy/bCSseeQi1ZAcnW4WqE+g== 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)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:AM5PR0801MB2018;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB2018; X-Forefront-PRVS: 0759F7A50A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(376002)(346002)(366004)(39840400004)(396003)(136003)(189003)(199004)(105586002)(14444005)(478600001)(31686004)(65806001)(65956001)(66066001)(106356001)(68736007)(93886005)(6246003)(47776003)(486006)(64126003)(76176011)(50466002)(966005)(229853002)(7736002)(6486002)(36756003)(7406005)(305945005)(8936002)(230700001)(5660300001)(6306002)(6116002)(3846002)(7416002)(65826007)(53936002)(2906002)(52146003)(2486003)(26005)(316002)(23676004)(956004)(77096007)(446003)(476003)(4326008)(2616005)(217873002)(86362001)(11346002)(386003)(58126008)(53546011)(16576012)(186003)(97736004)(6916009)(39060400002)(81156014)(25786009)(31696002)(81166006)(16526019)(52116002)(8676002)(6666003)(6606295002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB2018;H:[172.16.25.169];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts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lWU9PrKg3I4mso0PHIhn1x39DX50zZ9BFgrHenWq/AXc25PszjrlwKB+Wb6aSTthmXfsOkD22EA1AwqJ0f+vi3Ukz56QeKuLy2+g1I07ZvMk72A/rCNpk4aHK/9NlvuCWBS5O7/c+6QeDH2ngIg+0laMkXz1C9TsFbzXXmRmie1T6Q9+ME4GDZbOX/uiZb3gdfIJE7/y2+COFFMO2OwgdFZOQRn26Kcw57Tg3iWzaLojQicYogCy4n33YD0S7ZITe6rK+74awsW4A==;5:MI7gTbdgMBmtJrq7m/AXBi72p6z+P5VqThVyt4G64V92VET/Rh/p5B46X70R49RQXVJFMt9zLr789qKdsxG0nEo69HPq9WOLSyFYZQ9dGqmsssQGvHqYizq67duVvFGN87vSdv1dOucYyf46KYhJhqsUSY0YAO9y0D9cpkh9nsY=;7:O9BUrooRIBsW2jMHoFl2XrFNfGwQwkrhSqdKgYu/BydnnUaTjVGsCdOoAFaNK9+2irpUX3Qyrd5OHCoJOFr4KUeJbLnoQiQ/iBoZM56oCfG6Ukof3W1SOgtNCm/nV+DOHqPy8H5hskVEeOgKMD31DprI9xTkT7fwlOga2ONyI/Dtt4SN9fbBNeF7wBb3hO/TgYM7SIg2BvlnCLRLKGmN1kxiFY1EusiyOznJkQ+UXWiGdQXUWZioGZHBnSVTO5Hj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB2018;20:FGe2FsAO4/4N7qnqlvWq40a0XxN6zWHPxBHredlJ8FnQxndanpeSbiNQMiVOUiQFkGPGEVE3TLw1i0X7Xl9ugDMgQnLR2hKohQkHMAmaaGtWQwyk60afObQvBJskShmhvO9CfdzEFhts2c+T/iJTr6O4egOwhGAn0c3qAj3+twU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2018 10:58:20.0551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c5ab1ea-6de7-4f61-0e66-08d5fde70688 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2018 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.08.2018 13:37, Tetsuo Handa wrote: > On 2018/08/09 18:21, Kirill Tkhai wrote: >> 2)SRCU. Pros are there are no the above problems; we will have completely unlocked and >> scalable shrink_slab(). We will also have a possibility to avoid unregistering delays, >> like I did for superblock shrinker. There will be full scalability. >> Cons is enabling SRCU. >> > > How unregistering delays can be avoided? Since you traverse all shrinkers > using one shrinker_srcu, synchronize_srcu(&shrinker_srcu) will block > unregistering threads until longest inflight srcu_read_lock() user calls > srcu_read_unlock(). Yes, but we can do synchronize_srcu() from async work like I did for the further patches. The only thing we need is to teach shrinker::count_objects() and shrinker::scan_objects() be safe to be called on unregistering shrinker user. The next patches do this for superblock shrinker. > Unless you use per shrinker counter like below, I wonder whether > unregistering delays can be avoided... > > https://marc.info/?l=linux-mm&m=151060909613004 > https://marc.info/?l=linux-mm&m=151060909713005 I'm afraid these atomic_{inc,dec}(&shrinker->nr_active) may regulary drop CPU caches on another CPUs on some workloads. Also, synchronize_rcu() is also a heavy delay.