Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1159100rwd; Thu, 1 Jun 2023 11:14:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ioTwHCgH7Fdrg43fvbJ9Sv3i+2OL8SXehSDTGgQqqnuIjkS1HBZin/nt3u0ZKxYcUslX6 X-Received: by 2002:a17:90a:a102:b0:255:949b:b50d with SMTP id s2-20020a17090aa10200b00255949bb50dmr214147pjp.4.1685643249060; Thu, 01 Jun 2023 11:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685643249; cv=none; d=google.com; s=arc-20160816; b=qpEAQm25P/DGi02WlK1HnrHgqTUy2B+ftMZvIf+BCv3V4Gs/mIMKsiRC2N6B41LSaa QrUJJwifsKmEyKxNtTBeOt73NMgWqz+NuO+O8mub9RGqzWk8joVVkSRuzBXakatTQol3 BioVjE9zF0i2ps9aoCdBJj/dm6okk+ttAJJmo0SrVF/B/9y/AeBOMbJMIMFKlEuoMZzw YZ2DvmQop3WkBRjwZl2I5eUfSmI5Ws0p7aUtz4oM46073WeQHZu3U5OYURrXdcn9sqqw NpW4k+Q+3AW7x6zdXoClKwEqg5gMW1ELNMRDAzCBSBOU0ABCWy3FDPjSOlUVwJ9OKNk/ WaMQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=7gLsPpU09ZX1oPA5PFz5u/WQswLV/fVWR9RT9czI1/8=; b=XEGPpzqxpr0Caa1n99ebljXgKAXsk8B7pxf2kdgaFDRq7eyvwW26KJasVnZFWamZmc 4lVJZCWcjP1oQ8xcMo6tyJyoMS2hwLO/WCsz1XF+v59BqA83RFhxM9Ed3vd0FmMbg4dj vDuUmktPfp+knE55csFQz27Ak7P2BBqB9+aY/Hr1R3DlD3GyQIQRY7K0kbfWqWFT++et 5KbhbgOytWxs1OtMXkx+UetF16Pn9XZ4RFLOKDdI5ulXUpC/wbbhSNW4EqK+gQAJ6gY4 ehzBsJhlACI4lmwGbHveLfPVYQXLYMUEYBfweyRqreR4uwSND4Er4aje9nDKNBpxD6JC lt3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=otDvWmsV; 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 ce21-20020a17090aff1500b002533873625dsi1478562pjb.24.2023.06.01.11.13.53; Thu, 01 Jun 2023 11:14:09 -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=otDvWmsV; 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 S229667AbjFARxP (ORCPT + 99 others); Thu, 1 Jun 2023 13:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbjFARxN (ORCPT ); Thu, 1 Jun 2023 13:53:13 -0400 Received: from out-15.mta1.migadu.com (out-15.mta1.migadu.com [95.215.58.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7570313D for ; Thu, 1 Jun 2023 10:53:12 -0700 (PDT) Date: Thu, 1 Jun 2023 13:53:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1685641990; 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=7gLsPpU09ZX1oPA5PFz5u/WQswLV/fVWR9RT9czI1/8=; b=otDvWmsVMNh/LcZg1i8pBTm80teDhhYpay+emHGlZNdXYjInOAyG/6aqM/EmTgw+/2nn/J qqn0XbzbQqp9jxBteAPeeODAmRERpmBSukfT2OjeINaCtgN+4bDT8XKl4xhFvIHexRpXSY tXiy23crK9BdqQtA4wJfHbbwRkhhmcM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Song Liu Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, mcgrof@kernel.org, peterz@infradead.org, tglx@linutronix.de, x86@kernel.org, rppt@kernel.org Subject: Re: [PATCH 0/3] Type aware module allocator Message-ID: References: <20230526051529.3387103-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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=unavailable 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, May 30, 2023 at 03:48:51PM -0700, Song Liu wrote: > On Mon, May 29, 2023 at 11:25 AM Kent Overstreet > wrote: > > > > On Sat, May 27, 2023 at 10:58:37PM -0700, Song Liu wrote: > > > I don't think we are exposing architecture specific options to users. > > > Some layer need to handle arch specifics. If the new allocator is > > > built on top of module_alloc, module_alloc is handling that. If the new > > > allocator is to replace module_alloc, it needs to handle arch specifics. > > > > Ok, I went back and read more thoroughly, I got this part wrong. The > > actual interface is the mod_mem_type enum, not mod_alloc_params or > > vmalloc_params. > > > > So this was my main complaint, but this actually looks ok now. > > > > It would be better to have those structs in a .c file, not the header > > file - it looks like those are the public interface the way you have it. > > Thanks for this suggestion. It makes a lot of sense. But I am not quite > sure how we can avoid putting it in the header yet. I will take a closer > look. OTOH, if we plan to use Mike's new allocator to replace vmalloc, > we probably don't need this part. The architectures previously exported constants that were used by module_alloc(), why not stick with that? > AFAICT, we don't have a global text_poke() API yet. I can take a look > into it (if it makes sense). Great > Yeah, that's part of the goal to extend the scope from executable to all > types. Yeah it took me a bit to wrap my head around how this all makes sense - it started out as just a better module_alloc(), then there was lots of talk about hugepages. I like it more now, looking forward to see how it fits together with Mike's work :)