Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1495295imm; Tue, 3 Jul 2018 12:14:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe2dRH/XhYZCLhTUL185LBa/gHt69PvVVYRvXGSI3YxY9AAvv4a5Uss2rPEOK4UbsffNPee X-Received: by 2002:a17:902:5a4f:: with SMTP id f15-v6mr24337085plm.253.1530645242750; Tue, 03 Jul 2018 12:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530645242; cv=none; d=google.com; s=arc-20160816; b=JaUzxIO7qRXdf5tsFpxQY2CsXdYLywZf73tFdeWkrP3SFwtwsSQxDVPBVTqOcMdS/3 cnduRp7DluCPVGt+P3DukDhYONUzhcQSk1k8fQ2VH1cUKAUU81cF4lXslgGYTHWomY7/ m4gqw1cdzgb5FbMW0l6OAC5qRsdUV1doTZdkmrJN0EJ0N8gu70a007Zvuc8upsKKbBqo QFquYWcxRvGE8vE31z5Li7qgmlSWZcXvkiAUB6SJFmwls8U5PKQ5aDTS0hEMyK6h54eg b0xNXU0SZTyHwtvUbasmLiNBtZN/hmqLX+ia6SJkdXWoNAVL9eJH7lab0J5w9cGxWaUG KiDg== 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=uBwN2W1FuNa3kqq4v6HY9l8o8/r1A34pZn++pnDWg2I=; b=nERm5UTphwHlngBUaIVqHm924Jne0fkg3xZrqLLmNqF5hGCiPDdVTDQYre4T4XnZn4 cC0BCnhMI9Vs6R5gpUmXbzirSTLH6H5JgkRh7Y5/0uFImYJRdwnGudm60Dt/1SNrexpW jjJQulID73MsId6t+ABJQ4u1mayRj3bQIEIDbaxk7vyOV2PrSHhN+lZfYkRXn+jgQ+mx L2uqNL3qjV/I1BqJSRpQFJl541+nWSseflagR5UvehoYz8CfLsvpLeM6jW7+hpccLvWK zB6F/2Jp9J7N5XD+hhT4BVXH0hMpeYil1CuCpkJrnddFV51DFowZn70BtxGfY2t4iRH+ seRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=fOi1aEh4; 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 31-v6si1693451plj.216.2018.07.03.12.13.47; Tue, 03 Jul 2018 12: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=@virtuozzo.com header.s=selector1 header.b=fOi1aEh4; 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 S1753381AbeGCTNH (ORCPT + 99 others); Tue, 3 Jul 2018 15:13:07 -0400 Received: from mail-he1eur01on0098.outbound.protection.outlook.com ([104.47.0.98]:22400 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752019AbeGCTNF (ORCPT ); Tue, 3 Jul 2018 15:13:05 -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=uBwN2W1FuNa3kqq4v6HY9l8o8/r1A34pZn++pnDWg2I=; b=fOi1aEh4BOCPOgjaNa56MLso4Jkhz2DuYfQt/IA9Va8yIISEKu+6BnCgxKsEXnq8aIDSswgPdgaADCcLTOtYwA1C+XDKUzYRMlsV7crUAdbXv0W1HCSg2UbXWg6AG1zXWUqOqovnaelxgHgVpH+28mOI8tj2apPQjkbbqrYjaS0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (89.178.225.132) by VI1PR0801MB1344.eurprd08.prod.outlook.com (2603:10a6:800:3b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.26; Tue, 3 Jul 2018 19:12:56 +0000 Subject: Re: [PATCH v8 03/17] mm: Assign id to every memcg-aware shrinker To: Matthew Wilcox Cc: vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, 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, lirongqing@baidu.com, aryabinin@virtuozzo.com, akpm@linux-foundation.org References: <153063036670.1818.16010062622751502.stgit@localhost.localdomain> <153063054586.1818.6041047871606697364.stgit@localhost.localdomain> <20180703152723.GB21590@bombadil.infradead.org> <2d845a0d-d147-7250-747e-27e493b6a627@virtuozzo.com> <20180703175808.GC4834@bombadil.infradead.org> From: Kirill Tkhai Message-ID: <94c282fd-1b5a-e959-b344-01a51fd5fc2e@virtuozzo.com> Date: Tue, 3 Jul 2018 22:12:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180703175808.GC4834@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [89.178.225.132] X-ClientProxiedBy: HE1PR05CA0254.eurprd05.prod.outlook.com (2603:10a6:3:fb::30) To VI1PR0801MB1344.eurprd08.prod.outlook.com (2603:10a6:800:3b::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd08dd03-0894-415d-4584-08d5e118fd66 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600053)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR0801MB1344; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1344;3:cuaKaNRwuE5TZtjEBZKcCY5OODAOY6PglGQIVkRffBRQb3cIWZ/If6O62rJaCn4lmdk92TS0P/expztiXatniePZGq0x4iIVmOwW+dvQsob9PgEtXcK6+QhVyTAWNS8zh48vS5eK1PN5doXPb2eaij9Zcq8qYyaD11GDWe7lPmQSfWR+yKz3vnFPwKOLNjyF+4HDn6qGtx/s/4yLFoNtMZfARf8ZBium48Mjn/ZBfYSPls7VYqksiaTVSOkCzUFn;25:kufHKG2m8iKkkC1qbPKhkcwT4w4C8WcTEbHsavHxJaMvg/dmNicqJL4swxJT1eBjTnY3ukIg4GsUoRj0mzRA7i4G3SNtOaZGJiHKIU9vwC49BU/i9XTdQA3Gnu7Vp3KaWMb/ZEre6Gc+g+vL5wsK4q4XcY5tNjRiElLWwsM32NmsYl6tbXPREJXqueiWW4t2Jr6bezwrgsreOczqqClSEBQw5KLeDxXD47DiT/nbslzF/8+C9OL5OQHyRsYLCidkmrL4UFmYfi5Ycuhz12lOhHze01TH27/OYyebTqsOWrFg1jQqghgzrhY5SXiuSqP59wkX1hDMVnD9eNovJH6wQg==;31:TIirNmdFPDP/SlYOUaVXWkRripwmqSkdgtq7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am-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)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:VI1PR0801MB1344;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1344; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(376002)(366004)(136003)(346002)(39850400004)(396003)(189003)(199004)(11346002)(7416002)(446003)(316002)(486006)(47776003)(65806001)(186003)(64126003)(31696002)(53546011)(386003)(36756003)(956004)(68736007)(2616005)(6486002)(66066001)(53936002)(97736004)(65956001)(6506007)(6666003)(25786009)(476003)(5660300001)(26005)(86362001)(4326008)(65826007)(6916009)(58126008)(16526019)(105586002)(6116002)(93886005)(39060400002)(76176011)(6512007)(52116002)(52146003)(23676004)(106356001)(2486003)(31686004)(6246003)(229853002)(478600001)(7736002)(230700001)(81156014)(81166006)(8676002)(2906002)(3846002)(8936002)(50466002)(305945005);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB1344;H:localhost.localdomain;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) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4MDFNQjEzNDQ7MjM6NkZjRWxZK1F4U0hRV0hidzhwdDdUbHhq?= =?utf-8?B?WElWRG0rMlphaXllaUlEZncwRUJxSUpKY1hGSWY3VTdaL0xLNkttZjFSMkl0?= =?utf-8?B?SUt5V0NMaUpKQzlYY2FaLzcrZkhDOGZVODdZN08zMkR6YUpNR3V4RmkzMFJ0?= =?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uGx3+k5rpcesUyzqv8MoLORw4AmFfXqUmKt2fDR3ISBauQAz+TkINYZlKCk=;24:/SspqSHVuICWIqZ9l912KJCKKmGEtwq9fXgGIHEeXE5ayrd4pptkdC5CxQZkwqwwvYNVo3ohkEefdkvsFInP84lcDGLCg9FnoCRflCnjFQg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1344;7:ZmHhTf2HbWJVmh3+nP+UlVT53E7YgQK4jSQcc7hChBTg/QhApEO3zQHvFySaKI3Ox5yeJpRF7jXu0T0h5/oQ6ULFJl6AeIDH4RmI7EEuGF7sVKI3KVzMzBMT4rJft9y372NCiJHLAmC9YauhuZKCEEB8nAeGyQkQ0htLwTy0t4TvgX0zOzJByJ07+mcJIvqIOU1IMUiS+WgN8uQ8WjBuhPCpzDHwa/Xrbe3NInJYrr26ESnetToecsGvHGxjJo9E;20:VtKkeErfNKNGBcHwi5KyBXQBXglqDwovsCNIlwHhMYdfTy/wUGqw6dmK5JyTFYVJR3mCiEepnFF4A0P6WpdCgdKNDf1JBtx7mUKN0m5KBVhpWsP40EMSh5h7uwkeZCV6KIksQDy3uuUhdB2Wp8fNp58Ki1Y75gIo35pv9IfU46k= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 19:12:56.3813 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd08dd03-0894-415d-4584-08d5e118fd66 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1344 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.07.2018 20:58, Matthew Wilcox wrote: > On Tue, Jul 03, 2018 at 06:46:57PM +0300, Kirill Tkhai wrote: >> shrinker_idr now contains only memcg-aware shrinkers, so all bits from memcg map >> may be potentially populated. In case of memcg-aware shrinkers and !memcg-aware >> shrinkers share the same numbers like you suggest, this will lead to increasing >> size of memcg maps, which is bad for memory consumption. So, memcg-aware shrinkers >> should to have its own IDR and its own numbers. The tricks like allocation big >> IDs for !memcg-aware shrinkers seem bad for me, since they make the code more >> complicated. > > Do we really have so very many !memcg-aware shrinkers? > > $ git grep -w register_shrinker |wc > 32 119 2221 > $ git grep -w register_shrinker_prepared |wc > 4 13 268 > (that's an overstatement; one of those is the declaration, one the definition, > and one an internal call, so we actually only have one caller of _prepared). > > So it looks to me like your average system has one shrinker per > filesystem, one per graphics card, one per raid5 device, and a few > miscellaneous. I'd be shocked if anybody had more than 100 shrinkers > registered on their laptop. > > I think we should err on the side of simiplicity and just have one IDR for > every shrinker instead of playing games to solve a theoretical problem. It just a standard situation for the systems with many containers. Every mount introduce a new shrinker to the system, so it's easy to see a system with 100 or ever 1000 shrinkers. AFAIR, Shakeel said he also has the similar configurations. So, this problem is not theoretical, it's just a standard situation for active consumer or Docker/etc. >>> This will actually reduce the size of each shrinker and be more >>> cache-efficient when calling the shrinkers. I think we can also get >>> rid of the shrinker_rwsem eventually, but let's leave it for now. >> >> This patchset does not make the cache-efficient bad, since without the patchset the situation >> is so bad, that it's just impossible to talk about the cache efficiently, >> so let's leave lockless iteration/etc for the future works. > > The situation is that bad /for your use case/. Not so much for others. > You're introducing additional complexity here, and it'd be nice if we > can remove some of the complexity that's already there. You started from cache-efficienty, and now you moved to existing complexity. I did some cleanups in this patchset, also there is Vladimir's patch, which simplifies shrinker logic. Also there is already 17 patches. Which already existing complexity you want to remove? I don't think there is existing complexity directly connected to this patchset.