Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2140098rwi; Tue, 1 Nov 2022 04:28:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Q8pA36EHE3TcZcBT4BlBa3W83K8TMVpnU9U4vnOV+gXvMU2pooCu7ATfU24W9AqjOYsmw X-Received: by 2002:a17:902:f54f:b0:186:a437:f4d1 with SMTP id h15-20020a170902f54f00b00186a437f4d1mr18274977plf.168.1667302092890; Tue, 01 Nov 2022 04:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667302092; cv=none; d=google.com; s=arc-20160816; b=nqWG+MIvLrkc7yCZblHjSygckvjSAMqFf3pTq8BTvnFatCsRXFxkZ3o1NTfUe29FwH c48HAUvXoP6JuW9hSNeNDJGG0MxfldxYu+6cUXK9iX1AkAmcZru0FLtPEweqBp00hwo+ kCXNA9V5jx/f/Qxq1b407K18IZR5nWCE0T1EvnXzPywrwgwJbrANYEvYG0huQ54dq08T q+mOx9WqDQ6DLMBttt0f4LB+0CTw0rNuAcxj8cyszGeo+G+wWyfy7HwYHgwLcMOC4gZw 2zn+lV9ozKHzegrMaZc6fp0/3iS/Q8eQZf6sHjlkqZ8ay9PI/R3kP9RaG89fTMFL9653 0o+g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kDcCZaeFtmSiIUtLe4t5gqueFd8rVVEzcQ4RqkIJA/Q=; b=Z4VC+ro7ndZBerlYSWu+MBxuT4fg/iXj9SVQG4bVbwkBRRY8hLQITtTYShKZg9X7aE iVCqeo4DP/uBVGP/mFfNN213G50AMGCNaKIie4gN0e900qY/sHjh7HbH5taPq5WiQGyG qjk/rC1Nes0VnxS/otIPyso5TatNQRXBdtxeMUBaWJ6bWrUyIVDhEzJU1RCi0yIRrhhr cw8JmCeYX6tXrfGGXcjj2S3h5HJ7F5Kw4tjAiD8OmBHNtN1PhuIjjes0cTZhnpdHZr/X NJyH3iv+xxVEmqmRPoqhmjhvErVdv5x5+pH3G1vonxrBlV7z1Zv7akQKaa0O3sohyjXV 1/Ng== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n62-20020a632741000000b00457dc916cd8si12204439pgn.152.2022.11.01.04.27.59; Tue, 01 Nov 2022 04:28:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbiKAKk6 (ORCPT + 97 others); Tue, 1 Nov 2022 06:40:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiKAKkq (ORCPT ); Tue, 1 Nov 2022 06:40:46 -0400 Received: from outbound-smtp17.blacknight.com (outbound-smtp17.blacknight.com [46.22.139.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BD415A2E for ; Tue, 1 Nov 2022 03:40:43 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp17.blacknight.com (Postfix) with ESMTPS id 316151C36D7 for ; Tue, 1 Nov 2022 10:40:42 +0000 (GMT) Received: (qmail 7548 invoked from network); 1 Nov 2022 10:40:42 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 1 Nov 2022 10:40:42 -0000 Date: Tue, 1 Nov 2022 10:40:40 +0000 From: Mel Gorman To: Chen Wandun Cc: akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com Subject: Re: [PATCH] mm: fix pcp count beyond pcp high in pcplist allocation Message-ID: <20221101104040.o6gqtyyd5d4pkhle@techsingularity.net> References: <20221024134146.3442393-1-chenwandun@huawei.com> <20221024145555.oaoisy6m723h4axc@techsingularity.net> <20221025131959.sd47fipimhehf76i@techsingularity.net> <316bc0a2-34d9-e485-11d2-f3dffd0fdea4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <316bc0a2-34d9-e485-11d2-f3dffd0fdea4@huawei.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS 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 Mon, Oct 31, 2022 at 11:37:35AM +0800, Chen Wandun wrote: > > > > As is, the patch could result in a batch request of 0 and > > > ?I foget this, the patch need some improve, thanks. > > > > > > > fall through to allocating from the zone list anyway defeating the > > > > purpose of the PCP allocator and probably regressing performance in some > > > > csaes. > > > Same as I understand???how about set high/batch for each order in pcplist??? > > Using anything would than (X >> order) consumes storage. Even if storage > > was to be used, selecting a value per-order would be impossible because > > the correct value would depend on frequency of requests for each order. > > That can only be determined at runtime and the cost of determining the > > value would likely exceed the benefit. > > Can we set a experience value for pcp batch for each order during init > stage? I'm not sure what you mean by "experience value" but maybe you meant experimental value? > If so we can make accurately control for pcp size. Nowdays, the size of each > order in pcp list is full of randomness. I dont konw which scheme is better > for performance. > It is something that could be experimented with but the main question is -- what should those per-order values be? One option would be to enforce pcp->high for all high-order values except THP if THP is enabled. That would limit some of the issues with pcp->high being exceeded as even if two THPs are refilled, one of them is allocated immediately. I wasn't convinced it was necessary when implementing high-order PCP support but it could be evaluated. -- Mel Gorman SUSE Labs