Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3985744ioo; Wed, 25 May 2022 12:09:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6nN8tyOQbIQLWu6G+Bjta6Br9G1byM9X2nmJzwv1B138GjFUKMCWL+4T59jcE/Nfwy8OW X-Received: by 2002:a17:903:2c1:b0:158:f9d0:839c with SMTP id s1-20020a17090302c100b00158f9d0839cmr33829711plk.118.1653505780128; Wed, 25 May 2022 12:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653505780; cv=none; d=google.com; s=arc-20160816; b=Ct/bVUqIdE+zymNS8NyTbCcNkFXGtBSVlDgUQrGSj71GVSeQJQiDZK8OAlwjkRN4Y9 dtrXIIeixkqBVuVie/n3rCmk9+XwulQfDtnNs3B29wTa2TVtgQ3akmUzNQj4haXZLjl1 FXOnq8RvwH9Ad2yaO3fVq8GeyooOxo0D00nuXSBROsdKckDRQv31L1yXvQmwzoubHUC2 ROHu1qua4bYf6ODC6WPxK6bzWTd9IBixN13Q6kVqkwptBIULpcny0zstVhSLwWNzXvyC UCKSP5BMFOZyz40pu44neXm9bYPf/iOtrNiwDfGvmueKJOsdfenAncMlqejgDiNjWP/F UWvQ== 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:dkim-signature:date; bh=vkgpgq0MLg/tjJXAvXd1NI0cnHVkERy6akx7DcAkEY8=; b=pnQcd389BYp55ClPnlItt20C580NF06MhjLzzNfYCpqxvniMU/QCI2iFfzB/1HyIxI ZN/EX2EQEuH3dIqryw2RTmDFriDbfnfO8PNM4/PRA03FpJGzYMI8FBUzzOfiSBHyKX/q 8mA7DcWnaqnBYBNLlTidGRI7S4+j8V/DVvQ3bphxRng76s+/82kxs/7lIMqfdwHRjrYy 6nW7Em+c3P4bU8l4bc7prZjyuUP9zBVrlI+VZBi9ych6dKEmHPh4KoglVAxnfql/SeQw 4DGsJW8JLcg6ynSlhwkvn1ClM2Ev4xkmKg7vAuqlokUb735bIIuHLvaXDWz7eA5bucFD Sbcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IckRGymn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a17090332c900b0015872dc578csi21035905plr.311.2022.05.25.12.09.28; Wed, 25 May 2022 12:09:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IckRGymn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243218AbiEYBbz (ORCPT + 99 others); Tue, 24 May 2022 21:31:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241183AbiEYBby (ORCPT ); Tue, 24 May 2022 21:31:54 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD62442EC7; Tue, 24 May 2022 18:31:52 -0700 (PDT) Date: Tue, 24 May 2022 18:31:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1653442310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vkgpgq0MLg/tjJXAvXd1NI0cnHVkERy6akx7DcAkEY8=; b=IckRGymn51W5KSkNLGKDTL/8V3vl12R//mkoxvsoP3gyy98tW7DHo1FA4F0p1ga9sRz5TD 6FYxnT9//JecprFOB8jLgzbj00ug3+uTTxnUvnTh6E7aRsBziP72fgAqvxAnQoepov4Cae Dv4kVvVHCn1BGd7fheY1UI98MFBbRYM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Vasily Averin Cc: Andrew Morton , kernel@openvz.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt , Michal =?iso-8859-1?Q?Koutn=FD?= , Vlastimil Babka , Michal Hocko , cgroups@vger.kernel.org Subject: Re: [PATCH mm v2 9/9] memcg: enable accounting for percpu allocation of struct rt_rq Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 07:39:03PM +0300, 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. > > Signed-off-by: Vasily Averin Acked-by: Roman Gushchin