* Who is 'Freeing init memory ...'
@ 2013-08-15 8:08 Woody Wu
2013-08-15 8:41 ` Belisko Marek
0 siblings, 1 reply; 5+ messages in thread
From: Woody Wu @ 2013-08-15 8:08 UTC (permalink / raw)
To: kernelnewbies
Hi,
Near the end of kernel startup, there is a message 'Freeing init memory
..'. This process on embedded system takes several seconds. After
searched kernel source, however, I cannot find the same literal text in
all the .c files. So, I want to know, who was printing this message and
how can I disable the behavior to save some boot time since I don't care
losting of several hundreds kilo bytes of memory.
Thanks in advance.
woody
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 5+ messages in thread
* Who is 'Freeing init memory ...'
2013-08-15 8:08 Who is 'Freeing init memory ...' Woody Wu
@ 2013-08-15 8:41 ` Belisko Marek
2013-08-15 8:51 ` Woody Wu
0 siblings, 1 reply; 5+ messages in thread
From: Belisko Marek @ 2013-08-15 8:41 UTC (permalink / raw)
To: kernelnewbies
Hi,
On Thu, Aug 15, 2013 at 10:08 AM, Woody Wu <narkewoody@gmail.com> wrote:
> Hi,
>
> Near the end of kernel startup, there is a message 'Freeing init memory
> ..'. This process on embedded system takes several seconds. After
> searched kernel source, however, I cannot find the same literal text in
> all the .c files.
rgrep 'Freeing' . on kernell source give me a lot of output. I believe
you're looking on arm for that one:
arch/arm/mm/init.c: printk(KERN_INFO "Freeing %s memory:
%dK\n", s, size);
So, I want to know, who was printing this message and
> how can I disable the behavior to save some boot time since I don't care
> losting of several hundreds kilo bytes of memory.
>
> Thanks in advance.
> woody
>
> --
> I can't go back to yesterday - because I was a different person then
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Cheers,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Who is 'Freeing init memory ...'
2013-08-15 8:41 ` Belisko Marek
@ 2013-08-15 8:51 ` Woody Wu
2013-08-15 9:29 ` bill4carson
0 siblings, 1 reply; 5+ messages in thread
From: Woody Wu @ 2013-08-15 8:51 UTC (permalink / raw)
To: kernelnewbies
On Thu, Aug 15, 2013 at 10:41:39AM +0200, Belisko Marek wrote:
> Hi,
>
> On Thu, Aug 15, 2013 at 10:08 AM, Woody Wu <narkewoody@gmail.com> wrote:
> > Hi,
> >
> > Near the end of kernel startup, there is a message 'Freeing init memory
> > ..'. This process on embedded system takes several seconds. After
> > searched kernel source, however, I cannot find the same literal text in
> > all the .c files.
> rgrep 'Freeing' . on kernell source give me a lot of output. I believe
> you're looking on arm for that one:
> arch/arm/mm/init.c: printk(KERN_INFO "Freeing %s memory:
> %dK\n", s, size);
Yes, thank you very much! Now I want to disable the 'Freeing' behavior
to reduce boot time, is there a kernel config or cmdline option? I am
not sure if I can disable CONFIG_HIGHMEM to archive this purpose.
> So, I want to know, who was printing this message and
> > how can I disable the behavior to save some boot time since I don't care
> > losting of several hundreds kilo bytes of memory.
> >
> > Thanks in advance.
> > woody
> >
> > --
> > I can't go back to yesterday - because I was a different person then
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> Cheers,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 5+ messages in thread
* Who is 'Freeing init memory ...'
2013-08-15 8:51 ` Woody Wu
@ 2013-08-15 9:29 ` bill4carson
2013-08-15 9:40 ` Woody Wu
0 siblings, 1 reply; 5+ messages in thread
From: bill4carson @ 2013-08-15 9:29 UTC (permalink / raw)
To: kernelnewbies
On 2013?08?15? 16:51, Woody Wu wrote:
> On Thu, Aug 15, 2013 at 10:41:39AM +0200, Belisko Marek wrote:
>> Hi,
>>
>> On Thu, Aug 15, 2013 at 10:08 AM, Woody Wu<narkewoody@gmail.com> wrote:
>>> Hi,
>>>
>>> Near the end of kernel startup, there is a message 'Freeing init memory
>>> ..'. This process on embedded system takes several seconds. After
>>> searched kernel source, however, I cannot find the same literal text in
>>> all the .c files.
>> rgrep 'Freeing' . on kernell source give me a lot of output. I believe
>> you're looking on arm for that one:
>> arch/arm/mm/init.c: printk(KERN_INFO "Freeing %s memory:
>> %dK\n", s, size);
>
> Yes, thank you very much! Now I want to disable the 'Freeing' behavior
> to reduce boot time, is there a kernel config or cmdline option? I am
> not sure if I can disable CONFIG_HIGHMEM to archive this purpose.
Why not bother to read the code?
712 void free_initmem(void)
713 {
714 #ifdef CONFIG_HAVE_TCM
715 extern char __tcm_start, __tcm_end;
716
717 totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
718 __phys_to_pfn(__pa(&__tcm_end)),
719 "TCM link");
720 #endif
721
722 if (!machine_is_integrator() && !machine_is_cintegrator())
723 totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
724 __phys_to_pfn(__pa(__init_end)),
725 "init");
726 }
727
478 static inline int free_area(unsigned long pfn, unsigned long end, char *s)
479 {
480 unsigned int pages = 0, size = (end - pfn) << (PAGE_SHIFT - 10);
481
482 for (; pfn < end; pfn++) {
483 struct page *page = pfn_to_page(pfn);
484 ClearPageReserved(page);
485 init_page_count(page);
486 __free_page(page);
487 pages++;
488 }
489
490 if (size && s)
491 printk(KERN_INFO "Freeing %s memory: %dK\n", s, size);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Does this really mean operations before the "Freeing init memory" cause the delay????
You want to bypass "Now I want to disable the 'Freeing' behavior", are you kidding?
Please select printk timing the kernel hacking to find out where the delay actually lies.
>> So, I want to know, who was printing this message and
>>> how can I disable the behavior to save some boot time since I don't care
>>> losting of several hundreds kilo bytes of memory.
>>>
>>> Thanks in advance.
>>> woody
>>>
>>> --
>>> I can't go back to yesterday - because I was a different person then
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>> Cheers,
>>
>> marek
>>
>> --
>> as simple and primitive as possible
>> -------------------------------------------------
>> Marek Belisko - OPEN-NANDRA
>> Freelance Developer
>>
>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> Tel: +421 915 052 184
>> skype: marekwhite
>> twitter: #opennandra
>> web: http://open-nandra.com
>
--
?????????,??????????
--bill
^ permalink raw reply [flat|nested] 5+ messages in thread
* Who is 'Freeing init memory ...'
2013-08-15 9:29 ` bill4carson
@ 2013-08-15 9:40 ` Woody Wu
0 siblings, 0 replies; 5+ messages in thread
From: Woody Wu @ 2013-08-15 9:40 UTC (permalink / raw)
To: kernelnewbies
On Thu, Aug 15, 2013 at 05:29:05PM +0800, bill4carson wrote:
>
>
> On 2013?08?15? 16:51, Woody Wu wrote:
> >On Thu, Aug 15, 2013 at 10:41:39AM +0200, Belisko Marek wrote:
> >>Hi,
> >>
> >>On Thu, Aug 15, 2013 at 10:08 AM, Woody Wu<narkewoody@gmail.com> wrote:
> >>>Hi,
> >>>
> >>>Near the end of kernel startup, there is a message 'Freeing init memory
> >>>..'. This process on embedded system takes several seconds. After
> >>>searched kernel source, however, I cannot find the same literal text in
> >>>all the .c files.
> >>rgrep 'Freeing' . on kernell source give me a lot of output. I believe
> >>you're looking on arm for that one:
> >>arch/arm/mm/init.c: printk(KERN_INFO "Freeing %s memory:
> >>%dK\n", s, size);
> >
> >Yes, thank you very much! Now I want to disable the 'Freeing' behavior
> >to reduce boot time, is there a kernel config or cmdline option? I am
> >not sure if I can disable CONFIG_HIGHMEM to archive this purpose.
>
>
> Why not bother to read the code?
>
> 712 void free_initmem(void)
> 713 {
> 714 #ifdef CONFIG_HAVE_TCM
> 715 extern char __tcm_start, __tcm_end;
> 716
> 717 totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
> 718 __phys_to_pfn(__pa(&__tcm_end)),
> 719 "TCM link");
> 720 #endif
> 721
> 722 if (!machine_is_integrator() && !machine_is_cintegrator())
> 723 totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
> 724 __phys_to_pfn(__pa(__init_end)),
> 725 "init");
> 726 }
> 727
>
>
>
> 478 static inline int free_area(unsigned long pfn, unsigned long end, char *s)
> 479 {
> 480 unsigned int pages = 0, size = (end - pfn) << (PAGE_SHIFT - 10);
> 481
> 482 for (; pfn < end; pfn++) {
> 483 struct page *page = pfn_to_page(pfn);
> 484 ClearPageReserved(page);
> 485 init_page_count(page);
> 486 __free_page(page);
> 487 pages++;
> 488 }
> 489
> 490 if (size && s)
> 491 printk(KERN_INFO "Freeing %s memory: %dK\n", s, size);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Does this really mean operations before the "Freeing init memory" cause the delay????
> You want to bypass "Now I want to disable the 'Freeing' behavior", are you kidding?
>
I also quickly go through the code, also found that the message was
printed after the freeing job was done. At that moment I did not think
too carefully, just wanted to disable the 'freeing' procedure then see
what will happen. Yes, you are right, delay should caused by things
afterwards. I will check that with printk timing. See you & thanks!
> Please select printk timing the kernel hacking to find out where the delay actually lies.
>
>
>
> >>So, I want to know, who was printing this message and
> >>>how can I disable the behavior to save some boot time since I don't care
> >>>losting of several hundreds kilo bytes of memory.
> >>>
> >>>Thanks in advance.
> >>>woody
> >>>
> >>>--
> >>>I can't go back to yesterday - because I was a different person then
> >>>
> >>>_______________________________________________
> >>>Kernelnewbies mailing list
> >>>Kernelnewbies at kernelnewbies.org
> >>>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >>
> >>Cheers,
> >>
> >>marek
> >>
> >>--
> >>as simple and primitive as possible
> >>-------------------------------------------------
> >>Marek Belisko - OPEN-NANDRA
> >>Freelance Developer
> >>
> >>Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> >>Tel: +421 915 052 184
> >>skype: marekwhite
> >>twitter: #opennandra
> >>web: http://open-nandra.com
> >
>
> --
> ?????????,??????????
>
> --bill
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-15 9:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 8:08 Who is 'Freeing init memory ...' Woody Wu
2013-08-15 8:41 ` Belisko Marek
2013-08-15 8:51 ` Woody Wu
2013-08-15 9:29 ` bill4carson
2013-08-15 9:40 ` Woody Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.