Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4805831rwl; Tue, 28 Mar 2023 11:30:59 -0700 (PDT) X-Google-Smtp-Source: AKy350anXk5NHIU3hXC2+GPV7aDhkT24gH02Q9h52PSBhAXLAZz1nwD1aINqw7QKqqlBX+xRzNce X-Received: by 2002:a17:902:da8e:b0:19c:c9d0:5bf8 with SMTP id j14-20020a170902da8e00b0019cc9d05bf8mr21142686plx.35.1680028258751; Tue, 28 Mar 2023 11:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680028258; cv=none; d=google.com; s=arc-20160816; b=fALDGRCrz+aWdlcIcpKCD5Dp61/MbfOUTeBrosJWnx3ZTWPC7QqnGTfBm+OOG+erkL BLZrZ669t4/hXUwAZMjH0r6G4Own4vvonoK8IefW+k1Yz9zcZ9tWEU0j2aP4Au08zYVP fV3u9U3g9hYY9cX3BrHJKDevXRYcqXuApZzjdTrmEU/Y8uLHPJ52M18sHE7wuV6XdWXB od9CLQsg56yg6qVRCNccDqV3AV4Y0OLflCvhuu00Z1eplKnLrdM7ES3mDOINGafn5liH KhOqY08i7q9IHc2JbS585V0mCalUP+XfVFxaHw/sbSjxVPSujGa+beQfS2buEYs+y8dC SyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mF44mTcQDxi32SHw5oS+hBomZQPJLxNczN7gzosvezE=; b=LzFE6BIW3r440Od8nkYOCs6ZqIjxDZUruQqJjbPuo/Ht0LmyxR/msxgWMrZKkBFTg0 2ADGaCgBug1wqS4+PIvrEbBJSDev6sKV88ce+C39aS0DOL7EC8BwnA1+qrazLf9GFEDI JEol+2cXpCZNQ8xO62z+poXknpYiVF5UDnKVH1RstVG4moZtxvh0yCRO9YrzCou28B96 rOlQeLKdwIRg/EQ/zsbO+1xWCX8QajAPmtOovwufEakwps36VePARSl3bp7BME1WsecH xbW1uLWWveViz9yhHyRYOt17SmK5kA0KWLieIiKk+OMGJpTLVMH30np/EYEWnwRH9aNN rUbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=y0TFmUPk; 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 n21-20020a170903405500b001a1cbc3bce8si22419216pla.429.2023.03.28.11.30.46; Tue, 28 Mar 2023 11:30:58 -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=bombadil.20210309 header.b=y0TFmUPk; 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 S229836AbjC1R4H (ORCPT + 99 others); Tue, 28 Mar 2023 13:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjC1R4G (ORCPT ); Tue, 28 Mar 2023 13:56:06 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87491BBA8; Tue, 28 Mar 2023 10:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mF44mTcQDxi32SHw5oS+hBomZQPJLxNczN7gzosvezE=; b=y0TFmUPknQKAfD9dwyLjsgdaED XgLLqy5ZHDwzF4g/tlxv6M/rpKW6NB0Bx2ITjzBzuybM65sgwYr13eKwHVZVqfaRBhW4g+0QlHksX RLfqpGVYMm3c/QiP+EwB5QFm41QTg2/ZaukbmG/ReovW0muWrP/1yEqzI3Ertj/O05CL7oDqIj3Gv Cjq+1cbyHwksimH75ezvlCkjFoCIG94wLIKsK7A4lzQf9DwkaxZGnHq3zr2xWgHt7hxox7pErzp1S ktUyn2DraEcxedanXjc8L6/36fJ9l4AiF+04u/Dsk4Zn7iYxWDa6egToAOkX5V3VBgyxQAHDz8bW6 enIB5zxw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1phDY0-00FNsr-1z; Tue, 28 Mar 2023 17:55:52 +0000 Date: Tue, 28 Mar 2023 10:55:52 -0700 From: Luis Chamberlain To: Matthew Wilcox , Vincenzo Palazzo , Lucas De Marchi Cc: Mike Rapoport , Michal Hocko , linux-mm@kvack.org, Andrew Morton , Dave Hansen , Peter Zijlstra , Rick Edgecombe , Song Liu , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, x86@kernel.org, linux-modules@vger.kernel.org, Pankaj Raghav , Daniel Gomez , "kbus >> Keith Busch" , Davidlohr Bueso , Adam Manzanares , Kees Cook Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc() Message-ID: References: <20230308094106.227365-2-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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, Mar 28, 2023 at 10:52:08AM -0700, Luis Chamberlain wrote: > On Tue, Mar 28, 2023 at 06:37:13PM +0100, Matthew Wilcox wrote: > > On Tue, Mar 28, 2023 at 10:18:50AM -0700, Luis Chamberlain wrote: > > > differences with eBPF programs is that modules *can* be rather large > > > in size. What is the average size of modules? Well let's take a look: > > > > > > mcgrof@bigtwin /mirror/code/mcgrof/linux-next (git::master)$ find ./ > > > -name \*.ko| wc -l > > > 9173 > > > > ummm ... wc -c, surely? > > That's the number of allmodconfig modules found. > > mcgrof@fulton ~/linux (git::sysctl-next)$ find ./ -name \*.ko| head -2 > ./arch/x86/crypto/twofish-x86_64.ko > ./arch/x86/crypto/serpent-avx2.ko > mcgrof@fulton ~/linux (git::sysctl-next)$ find ./ -name \*.ko| head -2 | > wc -l > 2 > mcgrof@fulton ~/linux (git::sysctl-next)$ find ./ -name \*.ko| head -2 | > wc -c > 70 > > wc -c would give a lot more. wc -l gives me the module count. > > > > mcgrof@bigtwin /mirror/code/mcgrof/linux-next (git::master)$ find ./ > > > -name \*.ko| xargs stat -c "%s - %n" | sort -n -k 1 -r | tail > > > -$((9173-5)) | awk 'BEGIN {sum=0} {sum+=$1} END {print sum/NR/1024}' > > > 160.54 > > > > ... which invalidates all of these. > > Not sure ? But regardless the *.text* lookup is what we care for though > which was later. Which gets me thinking it'd be super nice if kmod tools supported querying this for us, then no fat finger could mess up the math: For all modules available: * Average module size * Average .text module size For only modules loaded: * Average module size * Average .text module size Luis