Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1003528rdh; Sun, 24 Sep 2023 23:22:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgQooW+OwbtldF7Bu/hWLo7MgDGJ9z09EzVfkEnATxKrEgqlp0mPc+BpgdegInXIGNKT8t X-Received: by 2002:a17:90a:c202:b0:268:5575:93d9 with SMTP id e2-20020a17090ac20200b00268557593d9mr3456673pjt.10.1695622967083; Sun, 24 Sep 2023 23:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695622967; cv=none; d=google.com; s=arc-20160816; b=rEDTf1JrnW3/V1o32kA6YpEALyAKRc9lzjleKZ8/E9J/vvwdaq/tbJtUfSbstabSJB vS4udkmRu91sdTbsh0U0Z2ZLsw5kyLJ92nb+LAHBy8B2a4vK2c1Gn9Jf2eD1GKixVoy2 Wo8wfXJc5pxk6CcASEtyUPHvvW3AjHGCW5S+sP8Y2fXX1ndSo8e4D/UuhvudPtxpS3QX vUf42dP6aG2+nD7UFR73pTXFBlyr/KYhaBuGaELS7h+A3x19iaSKo0uGW1cnr/KMvtCt 7MQzEUCZ5Xekt4dywyfbBNwJ+JhtrvQaYH9q+RFutRR30YSVSkifDuJa690QoJyOT0cr t8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:mime-version:date :dkim-signature:message-id; bh=m6vPV8LMOzVMcoIBD4Pznx00zoA77Ft1Xl6It5vC6EA=; fh=IJF5Y8jB+Ub6tuPMQWVWq5unMOvTBnwzLNd5hXnx8ro=; b=M8RaxAbHO8K33AzM5gcxJz5erGUMeDgAT/EJH+Xy0N+7m+2KvNddKewf4/67a3H8e/ zX1+cHVvrI4J0qfAlJYSQCjXzIFO70G/wwtc4Is+qQi730xjPmwdITfLDPW9MiePyONB pdIlSFbT+jK1ii7IfbPLx3Z0agCmhjq2GDp8GVm+Tkb9+LAjkcg3WIEUhXS0JGbukfM5 5weZg2E2odbiG7riyRayl7B4wLCKmnp27KZb08Nju+OCaLAZ9atDc47GeJtO7BnVBHhD lFJw4EIgsWfu1EEg7w94mYyDPsf3VrSCxPi1NMehXMM6K9tWhdEE6L0K6KJ153hoz+KI 0pzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vKoj5PBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e4-20020a17090ab38400b0027652755c20si9324352pjr.95.2023.09.24.23.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 23:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vKoj5PBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 18997807592F; Sun, 24 Sep 2023 20:25:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjIYDZp (ORCPT + 99 others); Sun, 24 Sep 2023 23:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjIYDZo (ORCPT ); Sun, 24 Sep 2023 23:25:44 -0400 Received: from out-197.mta0.migadu.com (out-197.mta0.migadu.com [IPv6:2001:41d0:1004:224b::c5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D58FA3 for ; Sun, 24 Sep 2023 20:25:37 -0700 (PDT) Message-ID: <798ddb57-ba09-e337-01b3-c80711f1e277@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695612335; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m6vPV8LMOzVMcoIBD4Pznx00zoA77Ft1Xl6It5vC6EA=; b=vKoj5PBKW1/qs/WVw0zO5MFXtb0jRZYZ0zYB7KwBrpF4QYevBdIrdHLqkd+S+dldpHi49H jkog9OtlQFsd2mLAXFNIXg/LY7Vkyydiyr6PobeljxqEN9FUCE+1OkKFrqx2sq8BRnmv03 TTlr02kB7HTHv9DZ+K0mdTBxtYMIXjg= Date: Mon, 25 Sep 2023 11:23:03 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 1/4] mm: pass set_count and set_reserved to __init_single_page To: Mike Rapoport , David Hildenbrand Cc: Matthew Wilcox , akpm@linux-foundation.org, mike.kravetz@oracle.com, muchun.song@linux.dev, glider@google.com, elver@google.com, dvyukov@google.com, osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com References: <20230922070923.355656-1-yajun.deng@linux.dev> <20230922070923.355656-2-yajun.deng@linux.dev> <2ed9a6c5-bd36-9b9b-7022-34e7ae894f3a@redhat.com> <20230922080831.GH3303@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yajun Deng In-Reply-To: <20230922080831.GH3303@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 24 Sep 2023 20:25:46 -0700 (PDT) On 2023/9/22 16:08, Mike Rapoport wrote: > On Fri, Sep 22, 2023 at 09:48:59AM +0200, David Hildenbrand wrote: >> On 22.09.23 09:47, Matthew Wilcox wrote: >>> On Fri, Sep 22, 2023 at 03:09:20PM +0800, Yajun Deng wrote: >>>> - __init_single_page(page, pfn, zone, nid); >>>> + __init_single_page(page, pfn, zone, nid, true, false); >>> So Linus has just had a big rant about not doing bool flags to >>> functions. And in particular _multiple_ bool flags to functions. >>> >>> ie this should be: >>> >>> #define INIT_PAGE_COUNT (1 << 0) >>> #define INIT_PAGE_RESERVED (1 << 1) >>> >>> __init_single_page(page, pfn, zone, nid, INIT_PAGE_COUNT); >>> >>> or something similar. >>> >>> I have no judgement on the merits of this patch so far. Do you have >>> performance numbers for each of these patches? Some of them seem quite >>> unlikely to actually help, at least on a machine which is constrained >>> by cacheline fetches. >> The last patch contains >> >> before: >> node 0 deferred pages initialised in 78ms >> >> after: >> node 0 deferred pages initialised in 72ms >> >> Not earth-shattering :D Maybe with much bigger machines relevant? > Patch 3 contains > > The following data was tested on an x86 machine with 190GB of RAM. > > before: > free_low_memory_core_early() 342ms > > after: > free_low_memory_core_early() 286ms > > Which is more impressive, but still I'm not convinced that it's worth the > added complexity and potential subtle bugs. > I will send v2.  It will be simpler and safer. >> -- >> Cheers, >> >> David / dhildenb >>