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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB877C433ED for ; Wed, 7 Apr 2021 11:09:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A58F61363 for ; Wed, 7 Apr 2021 11:09:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A58F61363 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A13596B007D; Wed, 7 Apr 2021 07:09:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C3AB6B007E; Wed, 7 Apr 2021 07:09:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B28E6B0080; Wed, 7 Apr 2021 07:09:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 70E306B007D for ; Wed, 7 Apr 2021 07:09:49 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2E7D95841 for ; Wed, 7 Apr 2021 11:09:49 +0000 (UTC) X-FDA: 78005300898.30.CF9B4EE Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf30.hostedemail.com (Postfix) with ESMTP id 2285FE000105 for ; Wed, 7 Apr 2021 11:09:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9AF7BB11B; Wed, 7 Apr 2021 11:09:47 +0000 (UTC) Subject: Re: [PATCH v1 0/5] percpu: partial chunk depopulation To: Roman Gushchin , Dennis Zhou Cc: Tejun Heo , Christoph Lameter , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210401214301.1689099-1-guro@fb.com> From: Vlastimil Babka Message-ID: <9da8492f-2ffb-2d4f-c937-93df28f0215a@suse.cz> Date: Wed, 7 Apr 2021 13:09:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210401214301.1689099-1-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2285FE000105 X-Stat-Signature: dz7takhpzzpskwdifm9171m1prcc3pq3 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1617793783-1920 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 4/1/21 11:42 PM, Roman Gushchin wrote: > In our production experience the percpu memory allocator is sometimes struggling > with returning the memory to the system. A typical example is a creation of > several thousands memory cgroups (each has several chunks of the percpu data > used for vmstats, vmevents, ref counters etc). Deletion and complete releasing > of these cgroups doesn't always lead to a shrinkage of the percpu memory. > > The underlying problem is the fragmentation: to release an underlying chunk > all percpu allocations should be released first. The percpu allocator tends > to top up chunks to improve the utilization. It means new small-ish allocations > (e.g. percpu ref counters) are placed onto almost filled old-ish chunks, > effectively pinning them in memory. > > This patchset pretends to solve this problem by implementing a partial Really "pretends"? :) Or did you mean "attempts"?