Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp240531rwe; Tue, 18 Apr 2023 21:21:38 -0700 (PDT) X-Google-Smtp-Source: AKy350ZPPZAVsUiXWmn3DBuiBoLwBqLxf6g76IwPu3V2gbhkSrHcgI12Ypyi6rDlLd25ZV1N7/mo X-Received: by 2002:a17:90a:3c89:b0:247:e5f:ca9 with SMTP id g9-20020a17090a3c8900b002470e5f0ca9mr1801641pjc.4.1681878098611; Tue, 18 Apr 2023 21:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681878098; cv=none; d=google.com; s=arc-20160816; b=UAR3GKb2qIqt5BX6Hggkg+qNAbDiHDOwgJJ3MThjrc63euhZ+whWBDozbyR9EZbVqZ XsFcTi2trRiOr0Rq5Uojeir87SnFR63jCMQykl8l5f8eqKtajIsolGKwqHrjNz+aFK/l Fe4P/5+xkKb+GaWho7Exhc3DRegD82v6JzsW9/GvA1im8r0M8uU3b6Qp1R5bT7wFfeCv EBbM7WLLvTBnQzMni8BHN0obMrBW4SlL71vEvlggo3GpHMlZos/tC41XwXxATEczvPna vF/6hzyu8b+ehx7kUfNjL32qQsbRSzE9KicZ6RuVlYskIU9oHEzfL6GsrBMQufkqo8F9 Qb2A== 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=fCirft2EQ+qvGc6ZahSkKa47nK3OVYtgm30zMVksWYc=; b=b/o9f9bN8Eh8SmjNTyExSjksgD2+ey5dK+5h6trNynphliC7K2MHCZ9iyJDt3KQJgT r34dmgWUq30PkQqIX7tiV/XGrYdG1q+Jxml4CMjsfIMKpw2kFImvgjmMY5zYTPVU1Y/1 hRkzibAMSBvs8zGhFv9cCA9jcugeur/WUTbALoyzvSjVB9/pa61WeK/mEFvx4xDOWJgt VdeUlKPxnYAvzGWp1JPOnTP2w9mSR8xP7oLPXLbDMMctYsJzPAkVLz4YhJ9v6jj3UJp/ C1ZS5UAfImZmgj7KeQMm1pRKKbouxZD/6FHIuAJ0kY0IIoy0xdBaSTbMu1uHumfYN9sp WA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=F3Mm3Lps; 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 lp17-20020a17090b4a9100b0023fb17227f6si686171pjb.154.2023.04.18.21.21.24; Tue, 18 Apr 2023 21:21:38 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=F3Mm3Lps; 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 S231464AbjDSEL4 (ORCPT + 99 others); Wed, 19 Apr 2023 00:11:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbjDSELy (ORCPT ); Wed, 19 Apr 2023 00:11:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE90C61AF for ; Tue, 18 Apr 2023 21:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fCirft2EQ+qvGc6ZahSkKa47nK3OVYtgm30zMVksWYc=; b=F3Mm3LpsRGSooA3ZUYSX/vadVw EshdMvO850KSZucpjBZNG0dxxMQ4GcYMsf37mR31oDQ3tChovu8d7vEWh+p/dTuE+de3LbPSHWX8k GZ9kFmHyWUiylFE1d4OH1/2uZCDlJMtFCN8ZVXpZf67VXzFMtZ8vp7IxgCNtNx9sZJeyW/qY/S/R/ Sgr3SNuJbsuhYpmmhqsOe3q5CGP29fgV7AkWR6RuOwpavFhcdRL6FGLPLbtU762JGe0T83XrVpnT4 dasscrClOZkYmjmUUM/9bJNkupRhq75tUoquhJpA4kUP1wh20nEqSQfjnq3o2Z47sOZwwl1glhsU+ pM5XMY4w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pozAX-00Cwu9-Co; Wed, 19 Apr 2023 04:11:45 +0000 Date: Wed, 19 Apr 2023 05:11:45 +0100 From: Matthew Wilcox To: Johannes Weiner Cc: linux-mm@kvack.org, Kaiyang Zhao , Mel Gorman , Vlastimil Babka , David Rientjes , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 00/26] mm: reliable huge page allocator Message-ID: References: <20230418191313.268131-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230418191313.268131-1-hannes@cmpxchg.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, Apr 18, 2023 at 03:12:47PM -0400, Johannes Weiner wrote: > This series proposes to make THP allocations reliable by enforcing > pageblock hygiene, and aligning the allocator, reclaim and compaction > on the pageblock as the base unit for managing free memory. All orders > up to and including the pageblock are made first-class requests that > (outside of OOM situations) are expected to succeed without > exceptional investment by the allocating thread. > > A neutral pageblock type is introduced, MIGRATE_FREE. The first > allocation to be placed into such a block claims it exclusively for > the allocation's migratetype. Fallbacks from a different type are no > longer allowed, and the block is "kept open" for more allocations of > the same type to ensure tight grouping. A pageblock becomes neutral > again only once all its pages have been freed. YES! This is exactly what I've been thinking is the right solution for some time. Thank you for doing it.