Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1296712rwd; Thu, 18 May 2023 10:14:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mVPrF54m78wU5n6/0t5MEe/t0lXVRC3xfrq94aGsz57AOgOA1USYhODTEI86F2oRITSeS X-Received: by 2002:a05:6a20:729c:b0:ec:6039:f76f with SMTP id o28-20020a056a20729c00b000ec6039f76fmr592064pzk.11.1684430046557; Thu, 18 May 2023 10:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684430046; cv=none; d=google.com; s=arc-20160816; b=Hvt43e0baU6T9+or0yz/c+8CTSIrI/E1LJf0WbYalsvEsyrKsadU3VUBjBt4f+jKZx tTcFN9usG8it73W/IyQZhT4Bsd8ZTSHfzJtYTBcQY8J3jjIsHv6gQSnu7sWSxuz8DG/J WHTUvjG68+2O6YQOUbhRDlH+kEkgLC0zHFv4i3iB/WdtGjXfrmTUkbPWw36mFHmsD02B Pn1Dnkt5s0nLO8Ac7SExKGGkx8px1boy4g8Kk5vWr4KSWhuJFibI6VL/NVhDWEe3r+aW wP8GUgyEullC1Dqgqt2bIyGAYmycssS9QNFB2+BLmKnj++VOKaCI8tmyhFOpvLLreql9 lZpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sCSVMW5kMTxYSaFkH40XHeC5n90U6Hx/eg/xMtGfKDo=; b=UiTT0avUyMpI0KghY6MBIX+0gfqBuZuqaXGX7S69mNh3p/V+Y6PEd8CLkEItAov8k9 3E58KMQ2ZCWTcI5Oj+uf7LQnVibDJ8+rJq5JpLZRlEh05G1G4fbaL9N5YwQ6gLD0ATpM hzPzQnxrua4wlYAhX0UxUd9KDUjvza5bE1NhJznW4c6GwqKqSi50+QG/UB8mmhwFgnRZ WjY85SwSS6siSQPvHr6qyPrnYUZjD6bUwdDp84L4dCBqEdn7G3IXiOfl8GpcAXV4xOv/ MVYjar5X0vY+QmXNvSTV6AOmu99VZJ6f5i6ymHgNrTSqPdirY9g8/bFZjCfxAyhgA2Cd b4Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i1juZWv4; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g26-20020a63375a000000b0052856cec94asi1823748pgn.884.2023.05.18.10.13.50; Thu, 18 May 2023 10:14:06 -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=@kernel.org header.s=k20201202 header.b=i1juZWv4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbjERRA7 (ORCPT + 99 others); Thu, 18 May 2023 13:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjERRA4 (ORCPT ); Thu, 18 May 2023 13:00:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38714121 for ; Thu, 18 May 2023 10:00:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C99E0650DF for ; Thu, 18 May 2023 17:00:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C42C433A1 for ; Thu, 18 May 2023 17:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684429254; bh=sCSVMW5kMTxYSaFkH40XHeC5n90U6Hx/eg/xMtGfKDo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=i1juZWv46pB3m27CQOX0N7Bw8qKT7bUAmyk8Kmr8u9NJyCwjm/iH0dyJrK01uHy7u EGisgfrv7Bt1pqQCSSpis5nHZ74oA8hzkE8oEvFvrcnRiUKbAk1QtNcZ5ntXKwJyCG F6fK9TCC59OjOlsRuiSWeii2ZNC18FceEfUzNjmzmgYmmZI3Bm5/bJ3au7tlb8KIHK yzrNf4FiM/MmzOW/RhqeAfFNIFEJkNER3WG4R4PuMyvS8Ekl6KyHWoMYdMF8ftc7fw /DVaK9vGrioLNvretdjUk4JTFKx6Xo7bM+XFrdk2tagqodI3S+0+MO7I7CjMOHwDxM XpyribiI6QHxA== Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4eed764a10cso2740243e87.0 for ; Thu, 18 May 2023 10:00:54 -0700 (PDT) X-Gm-Message-State: AC+VfDzBz3e6uEPPhIJazoRjFyIm/Qoo/bfwCrnEWProsukQoXa7cS8s RqHfl+JGxVWbBRZX5eLKKpTkgs8D103Ls/nq+y4= X-Received: by 2002:ac2:4575:0:b0:4e8:5576:98f4 with SMTP id k21-20020ac24575000000b004e8557698f4mr1296585lfm.45.1684429252015; Thu, 18 May 2023 10:00:52 -0700 (PDT) MIME-Version: 1.0 References: <20230308094106.227365-1-rppt@kernel.org> <20230308094106.227365-2-rppt@kernel.org> <20230518152354.GD4967@kernel.org> In-Reply-To: From: Song Liu Date: Thu, 18 May 2023 10:00:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc() To: Kent Overstreet 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 9:48=E2=80=AFAM Kent Overstreet wrote: > > On Thu, May 18, 2023 at 09:33:20AM -0700, Song Liu wrote: > > I am working on patches based on the discussion in [1]. I am planning t= o > > send v1 for review in a week or so. > > Hey Song, I was reviewing that thread too, > > Are you taking a different approach based on Thomas's feedback? I think > he had some fair points in that thread. Yes, the API is based on Thomas's suggestion, like 90% from the discussions= . > > My own feeling is that the buddy allocator is our tool for allocating > larger variable sized physically contiguous allocations, so I'd like to > see something based on that - I think we could do a hybrid buddy/slab > allocator approach, like we have for regular memory allocations. I am planning to implement the allocator based on this (reuse vmap_area logic): https://lore.kernel.org/linux-mm/20221107223921.3451913-2-song@kernel.org/ Thanks, Song > > I started on a slab allocator for executable memory allocations the > other day (very minimal, but tested it for bcachefs and it works). > > But I'd love to hear more about your current approach as well. > > Cheers, > Kent