Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2544652rdb; Fri, 22 Sep 2023 01:29:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECe6A3b6wg+ua2DLQHW9HU33mPgbxvxi6nrBbCV53FdIRYESF4HAFc/TIqJ+aFwd/Jt2JY X-Received: by 2002:a05:6a00:14d5:b0:68e:3f0b:5e6f with SMTP id w21-20020a056a0014d500b0068e3f0b5e6fmr8450115pfu.24.1695371396058; Fri, 22 Sep 2023 01:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695371396; cv=none; d=google.com; s=arc-20160816; b=wVJI78/Wz58AFYO62Q7SypEyngPxYRIBPJZRXXULzAVbvb1yF0UQvcIhKPd4Io5sdn kRShF6+ywSKLZw02QF8cfQwPa6slYHd1ot6riQIOreghewjalzwcY7J2PmZ0JLlNfp4t Oi7uOQ50E6OO1Ouqq6IzDmaYUpk/oW92/QOTs5a9BSyr96n82T1fzysO+lWBAAPh10YU MCIJmIw1uc4fsR/3hejCyYH1v87xHidR73waTfMwHesZSaFTJTXfkKIyybg5f9AC+rJX bYtuAjxFXNFkbRSZsYrCz7JsiiFIPpDa/RhuN962EG4wpwnpq2JSVIar0Pht5HuAF3T9 mXKQ== 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:dkim-signature; bh=OQolIfhh7homJyMPEX9/UxsWMWPQ/P/HantJlm/8pUE=; fh=CfbhsxpMlsA9bNz+SoXMCJCmvia5cpGZZdpAujZktvc=; b=SfvDPjYdxC7DMGSBY44URtpgraZP9LRlWxPiZN6y0i5L9Po/Yb98kp/z9Qow9p6cPt UG1Z08nk4UW+1cYM8k6S2q1rJkapfzPjU2Ue+qv26P6Odg1cf3Jaf8aovTIHaTQRHB0F xF0YEiPL0X0LURL7mQWUXVIpoPJzGYZ5GkcurUUKBuKTuNFoyiwmXRpfb9btc4kMfeCn Wv5sJnDV9Zp1yXm0nP4MvAzfc/UZApBfmCxPbq+SHQG3bPHKgmeYpC42+scFyx2EntNj uyzc2cKkfvCzEYp+ddc6JhvYPpdYL9vhKE93j+UwOOvpX7/wSf0MzeuYEA0AUfG+253y cPcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kXI++VKq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z16-20020a656650000000b0057808a9b0besi2935340pgv.664.2023.09.22.01.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 01:29:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kXI++VKq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1FF398112993; Fri, 22 Sep 2023 01:10:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232249AbjIVIKU (ORCPT + 99 others); Fri, 22 Sep 2023 04:10:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbjIVIJi (ORCPT ); Fri, 22 Sep 2023 04:09:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD2D61981 for ; Fri, 22 Sep 2023 01:09:19 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03E04C433CA; Fri, 22 Sep 2023 08:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695370159; bh=gesgJDKBt9RDzx1mXwpHnVS0bL79H7WYB0zJsn8L4gs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kXI++VKqARiqXJhZfCh8UJGk0/eL1A1I22cQVjhVJVmgTDIGQhuWWkUIzIhnFto/K f+zv1BzXJ/b7Kck3A6G9y7ce9cZ6yaqNWKjcapDD+fPk+Hg6Ct69A5QIDAtnCJT58f TvgGPz44rdMMdEO7o01UsuuEzoSbpQiotkqSd0hT8W0Z/i3RAbOpdiMCVUGHFTJf1R 5GBFiryI+K8buRmSQMF8Ubg5QFvGM01vqncI+w8D2Ao5xS/mOMKl2J2TfBWlHF+KR6 mz3bAOVnXZvwKr7KA2GJ139Qk6o9t1Z7hIvx5WfXgf2F6RxMaC5CaLsKpHayNSpa15 vF6zy836q0lnw== Date: Fri, 22 Sep 2023 11:08:31 +0300 From: Mike Rapoport To: David Hildenbrand Cc: Matthew Wilcox , Yajun Deng , 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 Subject: Re: [PATCH 1/4] mm: pass set_count and set_reserved to __init_single_page Message-ID: <20230922080831.GH3303@kernel.org> References: <20230922070923.355656-1-yajun.deng@linux.dev> <20230922070923.355656-2-yajun.deng@linux.dev> <2ed9a6c5-bd36-9b9b-7022-34e7ae894f3a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ed9a6c5-bd36-9b9b-7022-34e7ae894f3a@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:10:31 -0700 (PDT) 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. > -- > Cheers, > > David / dhildenb > -- Sincerely yours, Mike.