mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wilson Li <yongshenglee@yahoo.com>
To: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Samuel Masham <Samuel.Masham@jp.sony.com>
Subject: Re: Slow loading big kernel module in 2.6 on PPC platform
Date: Thu, 29 Sep 2005 16:50:25 -0700 (PDT)	[thread overview]
Message-ID: <20050929235025.13166.qmail@web34103.mail.mud.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0509290837500.22964@chaos.analogic.com>



>--- "linux-os (Dick Johnson)" <linux-os@analogic.com> wrote:
> 
> On Wed, 28 Sep 2005, Wilson Li wrote:
> 
> I have a module I am currently working on. It has some assembly
> stuff linked with it, so it was easy to modify. In the assembly
> I allocated 16 megabytes of static storage (using the .space
> keyword),
> first in the .data section, then in .rodata, then in .text. The
> .text section is where code exists. In no case did the module take
> more than 1/4 second to load. In all cases the size shown by
> `lsmod`
> reflected the enormous size of the module.
> 
> Now, that's static storage. If your code uses kmalloc() and
> friends to allocate a lot of storage when it is being loaded,
> then that's a different story. FYI, when you see a kernel message
> on the screen, that's not necessarily when it was "printed". It
> gets buffered, you know. If you want to time-check when various
> sections get control, to find out what's eating the time, then
> put the jiffie count into your kernel messages.
> 
> A simple macro using the __FUNCTION__ string and the jiffie
> count can go a long way towards finding out what's happening.
> 
> For instance, I once had a problem with continuous interrupts
> from a device, that couldn't be cleared, until the device was
> initialized. That slowed the system to a stand-still until
> I found that. The fix was easy, do some initialization before
> attaching the interrupt, at least enough to quiet the board.
> This board had an empty FPGA, whos bits need to be loaded
> with a bit-banger to make it work. The pin connected to an
> interrupt was just whatever-it-was-from-the-factory, before
> the intelligence was loaded. That system took about a minute
> for the first kernel message to be printed. Sometimes the
> system was very quiet <forever> and needed to be kicked.
> 
> 
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.13 on an i686 machine (5589.55
> BogoMips).
> Warning : 98.36% of all statistics are fiction.
> 
> ****************************************************************
> The information transmitted in this message is confidential and may
> be privileged.  Any review, retransmission, dissemination, or other
> use of this information by persons or entities other than the
> intended recipient is prohibited.  If you are not the intended
> recipient, please notify Analogic Corporation immediately - by
> replying to this message or by sending an email to
> DeliveryErrors@analogic.com - and destroy all copies of this
> information, including any attachments, without reading or
> disclosing them.
> 
> Thank you.

Appreciate your advice and help. I finally tracked it down to the
function called in init_module() in kernel/module.c.
 
/* Allow arches to frob section contents and sizes.  */
err = module_frob_arch_sections(hdr, sechdrs, secstrings, mod);

which takes most of time (more then 99%) during module loading just
as the reply from Semuel earlier.

Wilson Li
 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

  reply	other threads:[~2005-09-29 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 19:29 Wilson Li
2005-09-28 19:53 ` linux-os (Dick Johnson)
2005-09-28 22:27   ` Wilson Li
2005-09-29 13:04     ` linux-os (Dick Johnson)
2005-09-29 23:50       ` Wilson Li [this message]
2005-09-30 15:46         ` linux-os (Dick Johnson)
2005-09-28 20:55 ` Bill Davidsen
2005-09-28 21:37   ` Wilson Li
2005-09-29  7:36     ` Arjan van de Ven
2005-09-29  1:30 Samuel Masham
2005-09-29 23:46 ` Wilson Li
2005-09-30  0:58   ` Wilson Li
2005-09-30  2:57 ` Wilson Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050929235025.13166.qmail@web34103.mail.mud.yahoo.com \
    --to=yongshenglee@yahoo.com \
    --cc=Samuel.Masham@jp.sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®