Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1556852rwd; Thu, 18 May 2023 13:47:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Y6MQa1pS+DRAu5tiF8EBJMFcw5I780YO/BHomlrcnGOSRqmauFwNvVoOTsg3HQ1o5nkGK X-Received: by 2002:a17:90a:8d0f:b0:250:a964:9379 with SMTP id c15-20020a17090a8d0f00b00250a9649379mr4024098pjo.9.1684442866000; Thu, 18 May 2023 13:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684442865; cv=none; d=google.com; s=arc-20160816; b=ubagI1G/vjKWGxPT4wLcSp40Hcvtf4Ee2xwCPbz61HQOWoRKeitXE9Hg/Y+GvhAd+7 i+tDA6gtdtxxkRziDiYS9gk6DNjbAv/cT4HKbccqG6R6ic7CYFDwlt4CTY/nWKwoUW9H YU7LTfGjMXqrJJ0XWHajgrO254FYDXLHpzgVSa7stspzhjNAtMSEVQ903X4OfXNElyqf Kwo2FGZvPgr9SmIVKbNgk5OzLMohhdYAWaUK0FKYrAKoIO5qlbHRQDEKofL8SVxtYtQ9 +b7fIdzntFkeUhHpbIAIFdFY95ZI5A/iycsk3DRSRPv1RRkPyP3AcG4UD+//pSwje6Zu EzRQ== 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:dkim-signature:date; bh=sPKqCx3bzGKXDZMAPxP89wW4PBzj0chsnFR+/Ip42Qo=; b=LLQs7tFscFVyvNg2T/m/X37OOMIFCL11NV3VDlys9OGr12Q49YTZzy9uZ/7VUfDh1u e8Ww0xvATT7NOmzJ4qjoKhXZiMM6Ll4i/g7+qORPfwNnQyQppF5/btdnqt6/C19Jvmdq VEVJL5ttZpYywI9GjGylUmBKVY4XUFl3A7qJl5rPCExkXiK5cxRQq4L4XazVVR4T0Xsr PaRr01dnK22LwgZiIJw8kYtQB/8q2/WbaX7a5esCjOiwLFMVn33GJnXir6nVoGQ6d1uq s4cAFtCvQYciNTlcEtDfGym1RsaprzstW999zSTR3QdBnQH8QlDyHuKKJtuyR1s98xXN WCAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DluWjkg3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020a656ab6000000b005346ba59a0asi2271420pgu.219.2023.05.18.13.47.31; Thu, 18 May 2023 13:47:45 -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=@linux.dev header.s=key1 header.b=DluWjkg3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbjERUNu (ORCPT + 99 others); Thu, 18 May 2023 16:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjERUNt (ORCPT ); Thu, 18 May 2023 16:13:49 -0400 Received: from out-24.mta1.migadu.com (out-24.mta1.migadu.com [95.215.58.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A7B710CA for ; Thu, 18 May 2023 13:13:48 -0700 (PDT) Date: Thu, 18 May 2023 16:13:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1684440825; 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: in-reply-to:in-reply-to:references:references; bh=sPKqCx3bzGKXDZMAPxP89wW4PBzj0chsnFR+/Ip42Qo=; b=DluWjkg3LnHQ3zonfUK42JJRluEhv+QrOZp5pYVPshxkvdBvQ2YfK/GUh0iXVR2QW1ejB1 XaoPT2n4TrBbYuAJ0IKf1qHD6RwzcqXbUvqDEtlZELME2OicyU/YKoilAT7mKa+no+R1aq 2azpK45l9IK/ZfZHbtGLvMJ5VtklQsY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Song Liu Cc: Mike Rapoport , linux-mm@kvack.org, Andrew Morton , Dave Hansen , Peter Zijlstra , Rick Edgecombe , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc() Message-ID: References: <20230518152354.GD4967@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Thu, May 18, 2023 at 01:03:28PM -0700, Song Liu wrote: > If we use compound_order(), we will round up to power of 2 for all > allocations. Does this mean we will use 4MiB for a 2.1MiB allocation? Yes. This means we lose on average 33% - I believe, someone with better statistics might correct me - to internal fragmentation. But the buddy allocator will be better at avoiding and dealing with external fragmentation over time.