From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95B8DC433DB for ; Tue, 9 Mar 2021 19:56:08 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DA296523D for ; Tue, 9 Mar 2021 19:56:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DA296523D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lJiSH-0005KF-2C; Tue, 09 Mar 2021 14:55:45 -0500 Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lJiSE-0005K4-G3 for kernelnewbies@kernelnewbies.org; Tue, 09 Mar 2021 14:55:42 -0500 Received: by mail-ua1-x933.google.com with SMTP id m26so3474130uah.13 for ; Tue, 09 Mar 2021 11:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=94jxUi9fDM/lcsRJ9ruc4jmnT/cczbWBKFw6BlmOul4=; b=f7CRWmGv8PIRfqb0mGbVd7Skd/vSDlEFsHVvYMo6/E/ta8MNW8gkJzqZYwmUWczQ0v J/QvEaxBdIgOe/uZF+J/gAm/657f51ls7F0zX5r+BmNtLZmCWus3C0Z+FuLFJLVIvD9G xp/w9eF0JNfdJUNJMkr63DL0hmtBcYH65ew5M/w4omTjbregBNxJbVThXXRJ9XJ7XVco zO1pUtcx6p8tqI1iiEtRxehFyWgEZGUO9rkYAGse82E9aIraP7EodkrZYiNYzsv2a9Qp tfSqxFkrxL3t3xftXxO5zu2iUYqYjbVTPMEO/HmTa/ilKcW4kn1Ls1oPEPfpjQR/+8TP yELw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=94jxUi9fDM/lcsRJ9ruc4jmnT/cczbWBKFw6BlmOul4=; b=UlphCAxoAygQOCQSgrTThnvFFQLI1SKnCEH5mRwixeqh0rY6E/J0AwHL9kjtbYm0D4 aRQpLHmz9zefE6vcfLJ8qItwmp0eMcMy8YMTQYxnm8HqhLldfVvlWXfA6p6rpQhIgMnA LqkbS3W+kZHcnqhSyvmFGK5waTcJrHO3VSzdChvw1zOy0XwC9JR8kKZcm2/HSRVHhYxR fqJYDly/zNOMz2ogMHpQDRiZYs4ZaHoIGEtHlZk04Gx9Hgwfk7Jaez6gQSv3LX6ayvPB lcV0IF9hO2o7SYiiqnqKun/Z45c9gu26a9ZgTFSJqYtv7+S+Z2yArY0C2TV/d7SjbfsF Gk4w== X-Gm-Message-State: AOAM532829saptQzj0G+luw4XFnmH/0EaUy5DzztaZL6YAzXM6Nhj6Ux 4ABOsESmCjiNlrp9bqhsN7YM25clrm2x85CoJYUUof5Q3+RKWQ== X-Google-Smtp-Source: ABdhPJzYRemNyMGcovHPRP7AabftUtAGVVkqr7nlBLSXrrtcAOLvB+IoWj4GIamMoR/CiEWv6ag01qFGJsVjVfj5Who= X-Received: by 2002:ab0:1c45:: with SMTP id o5mr9369536uaj.13.1615319740798; Tue, 09 Mar 2021 11:55:40 -0800 (PST) MIME-Version: 1.0 From: jim.cromie@gmail.com Date: Tue, 9 Mar 2021 12:55:14 -0700 Message-ID: Subject: is there an efficient module_is_builtin() test ? To: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5732250869499082606==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============5732250869499082606== Content-Type: multipart/alternative; boundary="00000000000059583e05bd1fef31" --00000000000059583e05bd1fef31 Content-Type: text/plain; charset="UTF-8" Im trying to reduce memory used by internal tables built into DYNAMIC_DEBUG the main savings available is in the per pr_debug* callsite data: modname, filename, funcname. I have segregated those fields to a new __dyndbg_sites section, described by struct _ddebug_site, and now refd by new ptr in struct _ddebug That new ptr enlarges the memory footprint, so I want to replace it with an integer index into the section / array. Existing padding could hold the index. To use the index, I need &dyndbg_sites[], and that only works for builtin-module's callsites. For loaded modules, I can/have added a pointer to the section into module load_info, giving me the base I will need for the ! builtin branch. I just need a not expensive is-it-builtin (modref) --00000000000059583e05bd1fef31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Im trying to reduce memory used by
internal tables bui= lt into DYNAMIC_DEBUG

the main savings availab= le is in the per pr_debug*
callsite data: modname, filename, func= name.

I have segregated those fields to a new __dy= ndbg_sites section,
described by struct _ddebug_site, and now ref= d by new ptr in=C2=A0
struct _ddebug

Tha= t new ptr enlarges the memory footprint, so I want to replace it=C2=A0
with an integer index into the section / array.=C2=A0 Existing paddin= g could hold the index.

To use the index, I need= =C2=A0 &dyndbg_sites[], and that only works
for builtin-modul= e's callsites.=C2=A0 =C2=A0For loaded modules, I can/have=C2=A0
added a pointer to the section into module load_info, giving me
the base I will need for the ! builtin branch.

I= just need a not=C2=A0expensive=C2=A0 is-it-builtin (modref)

=

--00000000000059583e05bd1fef31-- --===============5732250869499082606== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============5732250869499082606==--