Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3938295pxb; Tue, 7 Sep 2021 10:46:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFCUXLmAMwIfJZkGzj9J/3iAvpIbcBE1zOEKFbu4Q7OIS47H4VpBKzSEN/iK/JtAcnfE8F X-Received: by 2002:a17:906:f243:: with SMTP id gy3mr19863753ejb.327.1631036791122; Tue, 07 Sep 2021 10:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631036791; cv=none; d=google.com; s=arc-20160816; b=GNMvNFZtlgqLMpeT6qwjo5VcHzC9F4anwM8QyWtWNi+jiTC0AIeT2b6kg5rvSsit6e u6DI+NtP8fWwBsmCExcBWo2ezUtd0xaWy4UOqH7KvmtaVbut6X5w/1ImftuUILt8owm6 qoOfTZu/PIWLSD+LYqpxbDiEVMnFDvYB6uwWlMzg0823xwLTgRURqTb6n2WTTf49c+eR wvFMmrF5UNdvcnKNraLd2F2F3LRdZIm2iyeQlk/pxab8/lysI3CUZZgBZe1OJDc8wAu/ s9UFQCHj3h9QtIlyafQoVR+ArAQ9OD+6woJW4rPHUX5QewzqqYagcJ0z4nX4vxHVYPLV dWyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=QrALAof3e93o8mC9f1B/BSGreLUfRte55Ordj5X3t8A=; b=ql3qbp1m+H47P9XfvwHT6Yop76nJAXxPhOWfVpRozwCbIBiGmOJYl74CK/ugkTgCQO rsN7JjAyMTkmG2u6oxsapuPO1YSvrAXHaSTmqipvF9s0Mkx8wxrxHpS4hqcdYZclL6rr 7WhwEYccRF1GvWwc09SKykTpXgdgRZj7rTddcvKeQNkeCutYorJ5ZFuAzTgxTOFN+V/z zLH9X5anAgIewM34Z5KBTApQ1aK/TmaVHl0V1NIICI9rkwqKDAe+fJdJeazm4vFE8zHq bTHVyhZjv5Az5UJdu88ez8VFGXmwyfic+/LYRae+zhqX72BF//55mZeZuOGNLN1hWaJB rLyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JMe6Am76; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z26si13346531ejc.230.2021.09.07.10.46.07; Tue, 07 Sep 2021 10:46:31 -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=@gmail.com header.s=20210112 header.b=JMe6Am76; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345667AbhIGRWI (ORCPT + 99 others); Tue, 7 Sep 2021 13:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbhIGRWH (ORCPT ); Tue, 7 Sep 2021 13:22:07 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123A0C061575 for ; Tue, 7 Sep 2021 10:21:01 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id j2so6257600pll.1 for ; Tue, 07 Sep 2021 10:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QrALAof3e93o8mC9f1B/BSGreLUfRte55Ordj5X3t8A=; b=JMe6Am76oke/iV4XHXHAUjTAkwDcgN0Nz1QkaAqGuCMjDkWnlKu2SH1TtN8U+V1AOh PN+dYSG+cka6tpYAfqR2xrgv276jzV8y14RuxLob8x0vgAwSyFA7xq5sSu/KMxqxngmw egy8RKL5soJxS6Wv1g9T3EsnMu9TGpqiyKvMxKGYKIDoKVJcvs7aWtZEU26Vbf6HOm4h dhDOTzMZSM3j4x00EXhk283kYzcfeWOA61vZVVPEiSKSzQrgt0jEcrmniEfAn8RGWNrf kIp1sz4q8OTsZn7tinh+V9z1I5UHwrJiTjZm4fRugaUF5RSF8iMVBl/7ejbltotSmMBA Lkrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=QrALAof3e93o8mC9f1B/BSGreLUfRte55Ordj5X3t8A=; b=VQTNazA+wN62dxPP/73TWmyc+8xUyjzOAzirYJgRnuKWXB57MzjloUiOvUdZ3gOTZK 5e0JujaxXrvjmcCs+VE3h4PnW3883CWtvfwjxy3L5ZpyUDrHSnrhx3OgWGNLrE3dT4uy nBfuz3DHijog5A7OnGaiXMUi2aDdXLKeKQcfuN8mKjvQmKT4LZuE6dE+9aYeIR5x9ONp 60ziaSVRlR778B8B88S39fftaeKWu+p6YfCgwSzrtipFd6fcV9A8zTyrewf7hOKZNaRP VxKMsm241VGlyoVhUjgyq4MhiVea7SjPWdIgZ8pkByEBGv+C/gIn0RvCr2r4Ssox+Zxs N28w== X-Gm-Message-State: AOAM533NgVpFTeqbfTDLDou61Tl8Zpl4EKgvchDZ6KgDthhAEfqWjlgW L9oQQhZOnnlXsL+/Xej6ocA= X-Received: by 2002:a17:90b:3ec1:: with SMTP id rm1mr5626136pjb.5.1631035260480; Tue, 07 Sep 2021 10:21:00 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id v7sm3007849pjg.34.2021.09.07.10.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 10:21:00 -0700 (PDT) Sender: Tejun Heo Date: Tue, 7 Sep 2021 07:20:58 -1000 From: Tejun Heo To: Jens Axboe Cc: Roman Gushchin , Linus Torvalds , kernel test robot , Vasily Averin , Shakeel Butt , 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 Subject: Re: [memcg] 0f12156dff: will-it-scale.per_process_ops -33.6% regression Message-ID: References: <20210907150757.GE17617@xsang-OptiPlex-9020> <774dee70-69bd-9f95-d197-4cff83e4e633@kernel.dk> <22a0156e-f74f-51c8-b7fd-9b5a375d7c81@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22a0156e-f74f-51c8-b7fd-9b5a375d7c81@kernel.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 07, 2021 at 11:18:21AM -0600, Jens Axboe wrote: > A purely time based approach might be problematic, as you can allocate a > LOT of data in a short amount of time. Heuristics probably need to be a > hybrid of "time much time has passed" OR "we're over the front cache > threshold in terms of deferred accounting". But yes, I don't see why > we'd necessarily need different approaches for short vs long life times. Yeah, it'd need some heuristics to guard against the cache exploding and a lot of laziness in expiration logic but none of those should be too complicated. Thanks. -- tejun