Otherwise the kernel will likely always run with 4K pages instead of 2MB pages, which is costly in terms of TLBs. Also optimize it a little bit by using only a single change_page_attr() calls. This is particularly useful if debugging is enabled inside it because it spams the logs much less. Cc: jbeulich@novell.com Signed-off-by: Andi Kleen <ak@suse.de> --- arch/x86/mm/init_64.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: linux/arch/x86/mm/init_64.c =================================================================== --- linux.orig/arch/x86/mm/init_64.c +++ linux/arch/x86/mm/init_64.c @@ -546,13 +546,15 @@ void free_init_pages(char *what, unsigne init_page_count(virt_to_page(addr)); memset((void *)(addr & ~(PAGE_SIZE-1)), POISON_FREE_INITMEM, PAGE_SIZE); - if (addr >= __START_KERNEL_map) - change_page_attr_addr(addr, 1, __pgprot(0)); free_page(addr); totalram_pages++; } - if (addr > __START_KERNEL_map) +#ifdef CONFIG_DEBUG_RODATA + if (begin >= __START_KERNEL_map) { + change_page_attr_addr(begin, (end - begin)/PAGE_SIZE, __pgprot(0)); global_flush_tlb(); + } +#endif } void free_initmem(void) --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Bryan Woods | Stardom SATA HSM violation |
| Yinghai Lu | Re: Linux 2.6.27-rc5: System boot regression caused by commit a2bd7274b47124d2fc4d... |
git: | |
| Abdelrazak Younes | Git-windows and git-svn? |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| walt | [VOTE] git versus mercurial |
| Bill Lear | Error "fatal: cannot pread pack file: Success" |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Henning Brauer | Re: About Xen: maybe a reiterative question but .. |
| Patrick Hemmen | ipsec with carp |
| Alexey Dobriyan | 2.6.25-rc8-mm2: FIX kmalloc-2048 (was Re: 2.6.25-rc8-mm2: IP: [<ffffffff802868f... |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Johann Baudy | Packet mmap: TX RING and zero copy |
