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=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 A6A03C4708C for ; Fri, 28 May 2021 11:59:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 15C6061186 for ; Fri, 28 May 2021 11:59:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15C6061186 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 5973B6B006C; Fri, 28 May 2021 07:59:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5478B6B006E; Fri, 28 May 2021 07:59:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E8096B0070; Fri, 28 May 2021 07:59:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 09B226B006C for ; Fri, 28 May 2021 07:59:39 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8F85E8410 for ; Fri, 28 May 2021 11:59:39 +0000 (UTC) X-FDA: 78190495278.05.86AFF70 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf04.hostedemail.com (Postfix) with ESMTP id 5CDC736A for ; Fri, 28 May 2021 11:59:34 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B95181FD2E; Fri, 28 May 2021 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622203177; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tyj9l9ik9fiIzg7ahnLVcj3TFNtj4jX5IrQ8z2cWPgA=; b=sdVeV8ySnJTQu+Ca7f81XuRHK4s3f4zOZkd7iI2juhIk9CE0wSMoVODxn2zP5huAUkhyDs lWghtWP1rCAZ2VLjJNPEum/30qcBNpgGe3Or9Lj0Y+YNRxd43BbljEREkEdN3mK8ce9uNI ppVP+Q7TTCc+55a/Czu3plq3vwkrNfM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622203177; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tyj9l9ik9fiIzg7ahnLVcj3TFNtj4jX5IrQ8z2cWPgA=; b=6xtxs6wu8gQnc+RhFPNUB1RttB7BEmlJBYfrKl9wxIEnVMnLk5lKDRaXX8KQAd1oWknvVq ImgSg2IQ6sEZm/Cw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id A0CEE11A98; Fri, 28 May 2021 11:59:37 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id tAS5JinbsGCJGAAALh3uQQ (envelope-from ); Fri, 28 May 2021 11:59:37 +0000 To: Mel Gorman , Andrew Morton Cc: Hillf Danton , Dave Hansen , Michal Hocko , LKML , Linux-MM References: <20210525080119.5455-1-mgorman@techsingularity.net> <20210525080119.5455-7-mgorman@techsingularity.net> From: Vlastimil Babka Subject: Re: [PATCH 6/6] mm/page_alloc: Introduce vm.percpu_pagelist_high_fraction Message-ID: <018c4b99-81a5-bc12-03cd-662a938ef05a@suse.cz> Date: Fri, 28 May 2021 13:59:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210525080119.5455-7-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=sdVeV8yS; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=6xtxs6wu; dmarc=none; spf=pass (imf04.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5CDC736A X-Stat-Signature: hhaoo9euteqaoq9mrzia88hep9nu6xnw X-HE-Tag: 1622203174-620679 Content-Transfer-Encoding: quoted-printable 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 5/25/21 10:01 AM, Mel Gorman wrote: > This introduces a new sysctl vm.percpu_pagelist_high_fraction. It is > similar to the old vm.percpu_pagelist_fraction. The old sysctl increase= d > both pcp->batch and pcp->high with the higher pcp->high potentially > reducing zone->lock contention. However, the higher pcp->batch value al= so > potentially increased allocation latency while the PCP was refilled. > This sysctl only adjusts pcp->high so that zone->lock contention is > potentially reduced but allocation latency during a PCP refill remains > the same. >=20 > # grep -E "high:|batch" /proc/zoneinfo | tail -2 > high: 649 > batch: 63 >=20 > # sysctl vm.percpu_pagelist_high_fraction=3D8 > # grep -E "high:|batch" /proc/zoneinfo | tail -2 > high: 35071 > batch: 63 >=20 > # sysctl vm.percpu_pagelist_high_fraction=3D64 > high: 4383 > batch: 63 >=20 > # sysctl vm.percpu_pagelist_high_fraction=3D0 > high: 649 > batch: 63 >=20 > Signed-off-by: Mel Gorman > Acked-by: Dave Hansen Acked-by: Vlastimil Babka Documentation nit below: > @@ -789,6 +790,25 @@ panic_on_oom=3D2+kdump gives you very strong tool = to investigate > why oom happens. You can get snapshot. > =20 > =20 > +percpu_pagelist_high_fraction > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +This is the fraction of pages in each zone that are allocated for each > +per cpu page list. The min value for this is 8. It means that we do > +not allow more than 1/8th of pages in each zone to be allocated in any > +single per_cpu_pagelist. This, while technically correct (as an upper limit) is somewhat misleadin= g as the limit for a single per_cpu_pagelist also considers the number of loca= l cpus. > This entry only changes the value of hot per > +cpu pagelists. User can specify a number like 100 to allocate 1/100th > +of each zone to each per cpu page list. This is worse. Anyone trying to reproduce this example on a system with m= ultiple cpus per node and checking the result will be puzzled. So I think the part about number of local cpus should be mentioned to avo= id confusion. > +The batch value of each per cpu pagelist remains the same regardless o= f the > +value of the high fraction so allocation latencies are unaffected. > + > +The initial value is zero. Kernel uses this value to set the high pcp-= >high > +mark based on the low watermark for the zone and the number of local > +online CPUs. If the user writes '0' to this sysctl, it will revert to > +this default behavior. > + > +