Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3305590lfo; Mon, 23 May 2022 01:13:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR2g9PFAnksNPs9Hj6RqpV8abWSwnXnCnGKyu0Y1tgf8xhZ2y0kgiF9r/spJnUUY0emMk3 X-Received: by 2002:a17:902:ee8d:b0:161:5c5c:d0e6 with SMTP id a13-20020a170902ee8d00b001615c5cd0e6mr22518732pld.32.1653293602239; Mon, 23 May 2022 01:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293602; cv=none; d=google.com; s=arc-20160816; b=kS08KEf76VnUW+v/4aXumJKef1OrgsLXiCIvLcZh8SLJpxZtVNeXxIUUNgs1sQr8mP 3xNpEgFkeeNUbtVpCqtV4m3NxT6CRgYz2YX8RniukS+pX9P5zSBCyOebFa2ZjBJyVGQM C0N3ltBPJF4xxh7FS18uqj1tW2wp9yxqqozoImddFNMCcgcpthsqhb6KRyrOX7l2QW2B S/ufkvZnn1RnMqQP2zGyeElZzaZJd7RzyS8hP+Ya2JF7Cf/PIVhSh6iWbb8x8yCz5iGn HDOiwPPz2M+1kP3xuBOedhJFul9FWmYozOkiomkcFiLpE5iZY2kDHPgTkbotUpc4rh/x KtVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zUHlY6J9Sffp4UlBWr1Ple6zvDOi7bfuxN73Sst2ROw=; b=Z0ccd/7xMTg/xhX792JMDrd8IBwMG6GncqkMv0MhUPMAOP5dRI6ygXuH+xlaHxh+f6 1UgG9/Of2321iF5SrsgoLT4fLWo4s4PMzD8gQCTifqpMhGocDF1wJqBWkYQ2QGBKLeJC wuHR3c9FcArDAlqOEvPMD7c/wJAQMZbUi2l2wKAYacNizcbMN7D/KpZ3rBxso1mPQoj/ QxTC8YIi1+6S0nmL5j1G6wSEkrT1XTn43khTTL+eysYw1Qv74QAoBh/UnE+5PhLSpPSp iU/0G8M/YAPQQsnopqsP6tDeii/a7vvjzJltqzr/17a2aiSUtf5qd8sTq84qTflMwnaf /VUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ra8coKkY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m13-20020a170902f64d00b00156c083f7f6si8817881plg.567.2022.05.23.01.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:13:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ra8coKkY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E41C322C907; Mon, 23 May 2022 00:08:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346706AbiEUVhZ (ORCPT + 99 others); Sat, 21 May 2022 17:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346545AbiEUVhW (ORCPT ); Sat, 21 May 2022 17:37:22 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8767527F0 for ; Sat, 21 May 2022 14:37:19 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id b5so2983076plx.10 for ; Sat, 21 May 2022 14:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zUHlY6J9Sffp4UlBWr1Ple6zvDOi7bfuxN73Sst2ROw=; b=ra8coKkYaI+nTpa/3tURJsZMGvzuQdyoQqh8jFxXJS7g0+8e01V8X9PBbCiPrE1FE6 Yzcm7D4kVznWFOyoJbAXwA0JksMwuxSeRKJHaepGZUl8lYbYFZgIG8Oi3E1d+6xIR/Sc O9wApVFLDj/uVKWe5ig9oA3BYUdXFeSE8Y1ocXJS1c7EiMbev7w5BL/bErmsf7p9aJl/ Ga9Uv5M/1wjbL+MLI3hBN5tyLtXCO3jyPshHGXAdVzvkrmR2TN14mpXOD3I1H4Ng8ii1 CyhknimccTj5ODRjBe/dfaGnat48A0Qkf0U68Lcxtde6yS4vHqKa0+SDw738gp0RWhGo pSYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zUHlY6J9Sffp4UlBWr1Ple6zvDOi7bfuxN73Sst2ROw=; b=WTYHm7tSjb/bhu/8Zf/O/N8VrKJZFRE0PndShgnwfWTfUAYFDmOSSjyuLjYuicyDVL le3O8os3UVFidw+/yP6+lzdBVdz2AJdRvMHUYa2jTA02W25tIwl9O/QkbXP6z06aUojO zgEoj1vYUcRgkxvin6ALkU2L5qn36l3s6uSQoARwCjus21/NAJbSSZMBtLl0WMyMZCBz xqh4EBLMy8YyZ6QIiWB+ioNG/VEFIknFeAcZ6aftmSsT24fTHLckes0GoVYUYBmuYEh2 kzRN9Yb07BXIMHJ3INX/rO17dQ9FIgK0JeQ73e8lZijpu5qR+BOIi0hNCap4Z2DS17Nd GgbQ== X-Gm-Message-State: AOAM532J7vcp4LrqZ/2v5udMYJdB+AT0/0H4DT/8UAwFZmYoT9P+FuUZ m7ENDJiPmPfYW6+uhquK3Xfu9blr6mmfTkciuhY/rg== X-Received: by 2002:a17:90b:4a51:b0:1df:7617:bcfb with SMTP id lb17-20020a17090b4a5100b001df7617bcfbmr18604605pjb.207.1653169039194; Sat, 21 May 2022 14:37:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shakeel Butt Date: Sat, 21 May 2022 14:37:08 -0700 Message-ID: Subject: Re: [PATCH mm v2 9/9] memcg: enable accounting for percpu allocation of struct rt_rq To: Vasily Averin Cc: Andrew Morton , kernel@openvz.org, LKML , Linux MM , Roman Gushchin , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Vlastimil Babka , Michal Hocko , Cgroups Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 21, 2022 at 9:39 AM Vasily Averin wrote: > > If enabled in config, alloc_rt_sched_group() is called for each new > cpu cgroup and allocates a huge (~1700 bytes) percpu struct rt_rq. > This significantly exceeds the size of the percpu allocation in the > common part of cgroup creation. > > Memory allocated during new cpu cgroup creation > (with enabled RT_GROUP_SCHED): > common part: ~11Kb + 318 bytes percpu > cpu cgroup: ~2.5Kb + ~2800 bytes percpu > > Accounting for this memory helps to avoid misuse inside memcg-limited > contianers. *containers > > Signed-off-by: Vasily Averin Acked-by: Shakeel Butt