Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp301521pxb; Wed, 8 Sep 2021 01:16:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLF7a2paBA8ezlGpKTzpY27e99l2WhwbirftzxeMWCzquWCOyelLGCSQm/TntlJnmciAMD X-Received: by 2002:a05:6402:11c9:: with SMTP id j9mr2597288edw.134.1631088997007; Wed, 08 Sep 2021 01:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631088996; cv=none; d=google.com; s=arc-20160816; b=L9JQDT12mgeTsXL2XYHpjRmdefKnhmoO9b34sTLYieSov3+p062la1WTuxesMHr5mD THFeIPUrh842E5WhbAq9tTCTXACuHVIL9o36+2en9Ws7n0ypvstgzPQjdA6RzugiJnW6 ET0qMINLu5TAAQ4TR/IVSzD95/MC8t2ewO8F8XefNGqBc3xfcB3U7NxbeiMHF+oxBLHu TtOGud7I3wNS6MZwtTitURdmMubu+Vb/LXbDelHbrr4AZzPsgT4cfAqSx1aRuz3Ulq2J Ti2aSe1MhIJfjiBMPoDXdNMCQbTgaJ7KZV0Xf20Yeijw0V22VLC1TSpvT+xE45B5u3BC dHJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=CeScSv+s7BSqIK9uY5ud+2JBnsA+UWpUIbdCkE+zAn8=; b=eYa1zbXPmk1hHhF3Ix0hpzv26N5My0bqB01fH3SfYdcYdD6/wa/ACsHhtGgEJyoHAR XgTfoSUdSZL0FWB/QsZ6N8LCYRyj6E6d332d5g/Gyf24W6aMK8hkYOXJS38jzR9wd5mO X6sU8Wvx8+xNx10kb/xAGOOK8ZoPTCSXcI//9LKyuEvspo9i6/77kNTK2zDagap/KI73 Uy+lsxY6L9wrqy2mewIJzdXCBLFzQuOujTBEaYQL4rhJC7PQBcNxBB7444NmsEzaVMBB nwmselhpCSONui1j9A/d+eTJNjSFFRJ+OSHtNyGhsg2XwYH1CvCFjmbCRtE95FpdVuw+ PqbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=hAzvfg1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x23si1434388edq.575.2021.09.08.01.16.13; Wed, 08 Sep 2021 01:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=hAzvfg1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347475AbhIHIPb (ORCPT + 99 others); Wed, 8 Sep 2021 04:15:31 -0400 Received: from relay.sw.ru ([185.231.240.75]:60890 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234696AbhIHIPY (ORCPT ); Wed, 8 Sep 2021 04:15:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=CeScSv+s7BSqIK9uY5ud+2JBnsA+UWpUIbdCkE+zAn8=; b=hAzvfg1I+6w8SLn+h Pxc9YbrLcuWRE34mv08Aq2hkPB62/iKjPt2K2QqilgmKjDPfh0+bHLEmopo6iSPMekhbnqyzjVM28 /uXImnnF1X23v3vpV7MCQidA258vlZp5KZvvr7L3LafDLmq9URUblA8Vr94Jla3pnccYnpk/a7/28 =; Received: from [10.93.0.56] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mNsiU-001Dt8-7g; Wed, 08 Sep 2021 11:13:58 +0300 Subject: Re: [memcg] 0f12156dff: will-it-scale.per_process_ops -33.6% regression To: Roman Gushchin , Shakeel Butt Cc: Tejun Heo , Jens Axboe , Linus Torvalds , kernel test robot , Alexander Viro , Alexey Dobriyan , Andrei Vagin , Borislav Petkov , Borislav Petkov , Christian Brauner , Dmitry Safonov <0x7f454c46@gmail.com>, "Eric W. Biederman" , Greg Kroah-Hartman , "H. Peter Anvin" , Ingo Molnar , "J. Bruce Fields" , Jeff Layton , Jiri Slaby , Johannes Weiner , Kirill Tkhai , Michal Hocko , Oleg Nesterov , Serge Hallyn , Thomas Gleixner , Vladimir Davydov , Yutian Yang , Zefan Li , Andrew Morton , LKML , lkp@lists.01.org, kernel test robot , "Huang, Ying" , Feng Tang , Zhengjun Xing References: <20210907150757.GE17617@xsang-OptiPlex-9020> <774dee70-69bd-9f95-d197-4cff83e4e633@kernel.dk> From: Vasily Averin Message-ID: <85da8df9-d6ae-5a06-a561-13eaf11344d7@virtuozzo.com> Date: Wed, 8 Sep 2021 11:13:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/21 10:42 PM, Roman Gushchin wrote: > On Tue, Sep 07, 2021 at 10:48:06AM -0700, Shakeel Butt wrote: >> On Tue, Sep 7, 2021 at 10:31 AM Roman Gushchin wrote: >>> >>> On Tue, Sep 07, 2021 at 07:14:45AM -1000, Tejun Heo wrote: >>>> Hello, >>>> >>>> On Tue, Sep 07, 2021 at 10:11:21AM -0700, Roman Gushchin wrote: >>>>> There are two polar cases: >>>>> 1) a big number of relatively short-living allocations, which lifetime is well >>>>> bounded (e.g. by a lifetime of a task), >>>>> 2) a relatively small number of long-living allocations, which lifetime >>>>> is potentially indefinite (e.g. struct mount). >>>>> >>>>> We can't use the same approach for both cases, otherwise we'll run into either >>>>> performance or garbage collection problems (which also lead to performance >>>>> problems, but delayed). >>>> >>>> Wouldn't a front cache which expires after some seconds catch both cases? >>> >>> I'm not sure. For the second case we need to pack allocations from different >>> tasks/cgroups into a small number of shared pages. It means the front cache >>> should be really small/non-existing. For the first case we likely need a >>> substantial cache. Maybe we can do something really smart with scattering >>> the cache over multiple pages, but I really doubt. >> >> I think we need to prototype this to sensibly evaluate. Let me know if >> you want to take a stab at this otherwise I can try. > > If you have time and are ready to jump in, please, go on. Otherwise I can start > working on it in few weeks. In any case, I'm happy to help with discussions, code > reviews & whatever else I can do. (Quite looking at the dubious achievement "my upstream patch was returned personally by Linus") Please keep me informed about these tasks too. Unfortunately I cannot help right now, however perhaps we will need to backport these patches to OpenVz kernels. Thank you, Vasily Averin