From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B603CC433F5 for ; Mon, 30 May 2022 15:49:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240786AbiE3PtO (ORCPT ); Mon, 30 May 2022 11:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237416AbiE3PtF (ORCPT ); Mon, 30 May 2022 11:49:05 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADECC4CD7A for ; Mon, 30 May 2022 08:06:46 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-2fee010f509so112572547b3.11 for ; Mon, 30 May 2022 08:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Af0PSK5bhyw9+f+5DkDwRAOmIX0S8zU96NIHBAioFvc=; b=IIUreoS7YFV8tvzCexC8C65TTMCRXB26Hzfj1WudjM4xZIb+eJy1GTgJE7v5pBwaLi BfFwoQfmw0ItOSvZ+sEnt3bkqNXDBUPKLLBxZYnVZ7CVifzBnCPIaIWhGOdfabqXH6w6 clYvnNL18cS0xSDtPHaLcVdPriA/r2wd9ac0t2vHh49MxZH9oyXzW4AAhyUp01E1GQgC xk4YuwgEOBgnf70nSpzqvHu6gYJEaiAdXTCaZJPXM+hB3/Y3r70sL6YmOueUYYT3nasr DxASAvBlFVVTn5rcZ73N1fwxFgdkwVWpRVMEJ0L8Fakf/zrEUGEGZmaeHUFX/49dPEyp yung== 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=Af0PSK5bhyw9+f+5DkDwRAOmIX0S8zU96NIHBAioFvc=; b=QO2ZWhkkLxJ99tyXLWMHL89genBwR+KM0lTfNBbfP4sXnZQ8dLyZQPPz8kwhJvafYS SPZAwX5LcIc2M6dlvBzdS+JDPRoCfwyWp/CJl8H26I9cZL08dYNPCVozDM3BTOq3NdDx Cbz4QXG9PFwoEK/AY7GQ6nJjn1n56hScekrmBAc38iVfe7taWMg0rURpNNKvXs+WKK1i XQ0TSirQfidETW4/qAkjOsMJ2iExlBrCwEwPXDcbPFYyhUljlyTz4kFfaC33zjpvXkk6 DqfdXtkpt/G2Rmx+1qPpJjQpThnjwNnfsmGpTMwOUoJbA3edAeJB8NTgBVCT6ZHW6xNy kzZA== X-Gm-Message-State: AOAM533sOzlaTAwRayMa6/pq65pybaiVnOLmEWX1UdjFxacuCcR0uro7 SZzdyC06+ry0pzEP76KTUg0STtW7SdXBrQUCOOBDtA== X-Google-Smtp-Source: ABdhPJyJAZSC9ENEzIbG/yOmn6yYK1ICiFZC4ZHfMlFBMNg/VcShoecGpOOZej8r8Sx7xI8MjtkdpYAMhJxG9ks/ORo= X-Received: by 2002:a81:1f84:0:b0:2f8:6138:de59 with SMTP id f126-20020a811f84000000b002f86138de59mr58340971ywf.31.1653923205877; Mon, 30 May 2022 08:06:45 -0700 (PDT) MIME-Version: 1.0 References: <06505918-3b8a-0ad5-5951-89ecb510138e@openvz.org> In-Reply-To: From: Muchun Song Date: Mon, 30 May 2022 23:06:09 +0800 Message-ID: Subject: Re: [PATCH mm v3 9/9] memcg: enable accounting for perpu allocation of struct rt_rq To: Vasily Averin Cc: Andrew Morton , kernel@openvz.org, LKML , Linux Memory Management List , Shakeel Butt , Roman Gushchin , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Vlastimil Babka , Michal Hocko , Cgroups Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 30, 2022 at 7:27 PM 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 > containers. > > Signed-off-by: Vasily Averin Acked-by: Muchun Song Thanks.