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 DF7E9C433EF for ; Wed, 25 May 2022 01:31:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243221AbiEYBb4 (ORCPT ); Tue, 24 May 2022 21:31:56 -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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Gushchin Subject: Re: [PATCH mm v2 9/9] memcg: enable accounting for percpu allocation of struct rt_rq Date: Tue, 24 May 2022 18:31:44 -0700 Message-ID: References: Mime-Version: 1.0 Return-path: 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= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vasily Averin Cc: Andrew Morton , kernel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Shakeel Butt , Michal =?iso-8859-1?Q?Koutn=FD?= , Vlastimil Babka , Michal Hocko , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.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