Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp53655pxy; Wed, 21 Apr 2021 18:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT46OrxAxDp/mPROUL9IdaVl8OJsaeIU61tjMxwl5A909aOGK49YF+LhDc6wx5BiZUkcqt X-Received: by 2002:a17:902:7201:b029:ec:b5c2:571c with SMTP id ba1-20020a1709027201b02900ecb5c2571cmr741884plb.55.1619054220201; Wed, 21 Apr 2021 18:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619054220; cv=none; d=google.com; s=arc-20160816; b=TbEsIfmb00ebjK6+63PPYJTCoSbQUQ5ikhCBkNtpQ6OhCt5BDMJGolD+SkheUpLzd2 ZTs3rHPYsOZbGxxwyibpLJAyd+cONns36SZ8kYWVsWE0q6EkQbzRrj6k4EdmS0qO2LsV bjf+EZ6tafdf9B+mUs0tSSqhihNr3Za720BWz3SmvQkePPeRugckZHUtAzHmcG/S7etn Xpx5sOgxAhg+JL32AeOI8Tk07GMOlvI/5JjgX5rO0kO4A88ccin4icXJtOW43GQ3FI1h 4GH66oq7hBl2WElf2LdVgtnT8XUuBtRaglRwfSM/EIIUm0fT0lr3mquWjUaG1AOhBHs+ t2vw== 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:date; bh=mPgB8yCc8zamYWb0vi63329hsT/Sv+pV390azKvDE9o=; b=l48qOlOIhYd4bsFHT2DcBfUeF/TSlGZTQwSXNIGG3w8/uEmc8z5mtI2BfrxqpL0NGI CjPejujG/zNBgigiU3NrYKmLOkY0vD7qpYNH5UvrOXSYG4e2mOTOAg6/R/yTENwdXc+p yeJOWDfRf6hDv22/S0MPm3Aw6/pMtcib5eoU7KPcGMUMoO+ZV/MeD2qoYMeVhwkRla0o pFUqWWV1x6N1l9x9hNO2mPOIcMtHjlSG6cDAxb0k/CHpiiTRxsXqBdr0iAIMS7AKslL1 ZcEnFRbXqcP+HZrtzVN20SFjgZGP3h3AYKBjbKoFIZj2AhhX8npBvzSaK9V7jTEPPwsP 7mug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si1230697ple.402.2021.04.21.18.16.48; Wed, 21 Apr 2021 18:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242715AbhDUSZe (ORCPT + 99 others); Wed, 21 Apr 2021 14:25:34 -0400 Received: from mail-io1-f41.google.com ([209.85.166.41]:38722 "EHLO mail-io1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241161AbhDUSZe (ORCPT ); Wed, 21 Apr 2021 14:25:34 -0400 Received: by mail-io1-f41.google.com with SMTP id q25so11641605iog.5 for ; Wed, 21 Apr 2021 11:25:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mPgB8yCc8zamYWb0vi63329hsT/Sv+pV390azKvDE9o=; b=fobxI6dfdYW9iFYsk4luNw8phk2xsDaylgfegZmrV9yvZkRTrefe/3WcCtnTh4uInA rnayPqD5rEk07y6bhc/eDOpWn9GO3L4lAVZcZ0L7e3BGicvZyAgZX+Ue+0kyJGU1wANX W6tj4kW9wVbXO11ATdBeWP5CPcEsITm0ICHm0zm8SysprimnuD6dx9OwLOsNpNUmxOnI nDbSmOJSlV+UNr25TseMd+eXNS2AHXB2264Qs0m+RGKMwL5YkVs18AGRRit4TaM9X93L 4d3oPklXX+78MRHKOcem7dmcKJGMqU2lN3gdntsrqZk68CAykqir9Ps70mtS9yzGBhDv Cdwg== X-Gm-Message-State: AOAM532dBvWCHTtf0IHTdiexHeFjFoSksG4rTEQh+f2FWPqYVApKmEXs x2AJh0+cSsY6iIBTZ+3xFtBv1egPtKI= X-Received: by 2002:a02:968f:: with SMTP id w15mr15747575jai.109.1619029500338; Wed, 21 Apr 2021 11:25:00 -0700 (PDT) Received: from google.com (243.199.238.35.bc.googleusercontent.com. [35.238.199.243]) by smtp.gmail.com with ESMTPSA id y19sm63666ili.51.2021.04.21.11.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 11:24:59 -0700 (PDT) Date: Wed, 21 Apr 2021 18:24:58 +0000 From: Dennis Zhou To: Tejun Heo , Christoph Lameter , Roman Gushchin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] percpu: partial chunk depopulation Message-ID: References: <20210419225047.3415425-1-dennis@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210419225047.3415425-1-dennis@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 10:50:43PM +0000, Dennis Zhou wrote: > Hello, > > This series is a continuation of Roman's series in [1]. It aims to solve > chunks holding onto free pages by adding a reclaim process to the percpu > balance work item. > > The main difference is that the nr_empty_pop_pages is now managed at > time of isolation instead of intermixed. This helps with deciding which > chunks to free instead of having to interleave returning chunks to > active duty. > > The allocation priority is as follows: > 1) appropriate chunk slot increasing until fit > 2) sidelined chunks > 3) full free chunks > > The last slot for to_depopulate is never used for allocations. > > A big thanks to Roman for initiating the work and being available for > iterating on these ideas. > > This patchset contains the following 4 patches: > 0001-percpu-factor-out-pcpu_check_block_hint.patch > 0002-percpu-use-pcpu_free_slot-instead-of-pcpu_nr_slots-1.patch > 0003-percpu-implement-partial-chunk-depopulation.patch > 0004-percpu-use-reclaim-threshold-instead-of-running-for-.patch > > 0001 and 0002 are clean ups. 0003 implement partial chunk depopulation > initially from Roman. 0004 adds a reclaim threshold so we do not need to > schedule for every page freed. > > This series is on top of percpu$for-5.14 67c2669d69fb. > > diffstats below: > > Dennis Zhou (2): > percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1 > percpu: use reclaim threshold instead of running for every page > > Roman Gushchin (2): > percpu: factor out pcpu_check_block_hint() > percpu: implement partial chunk depopulation > > mm/percpu-internal.h | 5 + > mm/percpu-km.c | 5 + > mm/percpu-stats.c | 20 ++-- > mm/percpu-vm.c | 30 ++++++ > mm/percpu.c | 252 ++++++++++++++++++++++++++++++++++++++----- > 5 files changed, 278 insertions(+), 34 deletions(-) > > Thanks, > Dennis I've applied this to for-5.14 with 1 modification to the batching threshold, 4 pages is quite little, so make it 16. Thanks, Dennis