Skip to contentSkip to conversation

Commit 722bc6b167 breaks booting on an 8TB system.

DISCUSSION Robin Holt 4 participants 12 messages Jun 1, 2012 – Jun 8, 2012

Subsystems (2)
lore
Share & tools
lore

Robin Holt

author
#0 lore raw

I just tried to boot an 8TB system. It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

Thanks,
Robin

#1 lore raw

very interested about how long time take it to boot, I have tested with 4TB.

Thanks for your info.

Ethan

Quoted 17 lines · 在 2012-6-1,23:54,Robin Holt <[email protected]> 写道:

I just tried to boot an 8TB system. It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

Thanks,
Robin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Robin Holt
Quoted 9 lines · Robin Holt

I just tried to boot an 8TB system.  It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

have some local patches. please check if they are helping...

Thanks

Yinghai

---
 arch/x86/mm/init.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/mm/init.c +2 -1
Index: linux-2.6/arch/x86/mm/init.c
===================================================================
@@ -62,7 +62,8 @@ static void __init find_early_table_spac
 		extra += PMD_SIZE;
 #endif
 		/* The first 2/4M doesn't use large pages. */
-		extra += mr->end - mr->start;
+		if (mr->start < PMD_SIZE)
+			extra += mr->end - mr->start;
 
 		ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	} else

Subject: [PATCH 1/3] x86, mm: Introduce global page_size_mask

Add probe_page_size_mask() to detect if need to use 1G or 2M. and store them in page_size_mask.

Only probe them at first init_memory_mapping calling.
second and later init_memory_mapping() calling does not need probe again. also we don't need to pass use_gbpages around.

---
 arch/x86/include/asm/pgtable.h |    1 
 arch/x86/mm/init.c             |   70 +++++++++++++++++++++--------------------
 2 files changed, 37 insertions(+), 34 deletions(-)
arch/x86/include/asm/pgtable.h +1 -0
Index: linux-2.6/arch/x86/include/asm/pgtable.h
===================================================================
@@ -597,6 +597,7 @@ static inline int pgd_none(pgd_t pgd)
 #ifndef __ASSEMBLY__
 
 extern int direct_gbpages;
+extern int page_size_mask;
 
 /* local pte updates need not use xchg for locking */
 static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
arch/x86/mm/init.c +36 -34

115 lines not on this page · raw message

---
 arch/x86/mm/init.c |   46 ++++++++++++++++++++++++++++------------------
 1 file changed, 28 insertions(+), 18 deletions(-)
arch/x86/mm/init.c +28 -18

61 lines not on this page · raw message

author
#3 lore raw
Quoted 6 lines · Yinghai Lu
Quoted 5 lines · Robin Holt

I just tried to boot an 8TB system.  It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables
Quoted 6 lines
Quoted 4 lines

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

have some local patches. please check if they are helping...

I will not have access to the machine until late tonight/early tomorrow (approximately 24 hours from now). I will try to give the patches a run then. Would you like them tested individually or as a set?

Robin

#4 lore raw
Quoted 9 lines · Robin Holt
Quoted 8 lines · Yinghai Lu
Quoted 7 lines · Robin Holt

I just tried to boot an 8TB system.  It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

have some local patches. please check if they are helping...

I will not have access to the machine until late tonight/early tomorrow (approximately 24 hours from now).  I will try to give the patches a run then.  Would you like them tested individually or as a set?

only_need_recalculate_for_low.patch

should be enough.

Thanks

Yinghai

author
#5 lore raw
Quoted 15 lines · Yinghai Lu
Quoted 14 lines · Robin Holt
Quoted 12 lines · Yinghai Lu
Quoted 9 lines · Robin Holt

I just tried to boot an 8TB system.  It fails very early in boot with:

Kernel panic - not syncing: Cannot find space for the kernel page tables

A git bisect lead me to commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit based on Linus' current as of a few hours ago (commit fb21aff) does boot past that point on the 8TB configuration.

have some local patches. please check if they are helping...

Quoted 7 lines
Quoted 3 lines

I will not have access to the machine until late tonight/early tomorrow (approximately 24 hours from now).  I will try to give the patches a run then.  Would you like them tested individually or as a set?

only_need_recalculate_for_low.patch

should be enough.

With just that patch, no improvement.

Sorry about the delay. I got bumped from the machine yesterday. The next reservable time is tomorrow night, otherwise, the machine is booked solid for the next 36 hours.

Robin

author
#6 lore raw
Quoted 5 lines

With just that patch, no improvement.

Sorry about the delay. I got bumped from the machine yesterday. The next reservable time is tomorrow night, otherwise, the machine is booked solid for the next 36 hours.

Wait. I was wrong. I booted the wrong kernel. With that patch applied, the machine does boot.

Thanks,
Robin

#7 lore raw
Quoted 8 lines · Robin Holt
Quoted 5 lines

With just that patch, no improvement.

Sorry about the delay. I got bumped from the machine yesterday. The next reservable time is tomorrow night, otherwise, the machine is booked solid for the next 36 hours.

Wait. I was wrong. I booted the wrong kernel. With that patch applied, the machine does boot.

Great.

Could you guys please write a usable changelog for only_need_recalculate_for_low.patch and send it to me with lkml Cc:-ed, so that I can send the fix to Linus ASAP?

Thanks,

Ingo

author
#8 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Robin Holt
Quoted 5 lines

With just that patch, no improvement.

Sorry about the delay. I got bumped from the machine yesterday. The next reservable time is tomorrow night, otherwise, the machine is booked solid for the next 36 hours.

Quoted 8 lines
Quoted 2 lines

Wait. I was wrong. I booted the wrong kernel. With that patch applied, the machine does boot.

Great.

Could you guys please write a usable changelog for only_need_recalculate_for_low.patch and send it to me with lkml Cc:-ed, so that I can send the fix to Linus ASAP?

I also tested this on a separate 2TB system which had been experiencing boot problems as well as a the original failing system configured as a 16TB system. It worked on all systems tested so far.

Robin

Tested-by Robin Holt
#9 lore raw
In reply to Ingo Molnar
Quoted 11 lines · Ingo Molnar
Quoted 3 lines · Robin Holt

Wait.  I was wrong.  I booted the wrong kernel.  With that patch applied, the machine does boot.

Great.

Could you guys please write a usable changelog for only_need_recalculate_for_low.patch and send it to me with lkml Cc:-ed, so that I can send the fix to Linus ASAP?

please check attached one.

Thanks

Yinghai

Subject: [PATCH] x86: Only add extra pages count for first memory range during pre-allocate early page table space

Robin found:

| I just tried to boot an 8TB system.  It fails very early in boot with:
|
| Kernel panic - not syncing: Cannot find space for the kernel page tables

git bisect commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.
A git revert of that commit does boot past that point on the 8TB configuration.

That commit will add up extra pages for all memory range even above 4g.

Try to limit that extra page count adding to first entry only.

---
 arch/x86/mm/init.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/mm/init.c +2 -1
Index: linux-2.6/arch/x86/mm/init.c
===================================================================
@@ -62,7 +62,8 @@ static void __init find_early_table_spac
 		extra += PMD_SIZE;
 #endif
 		/* The first 2/4M doesn't use large pages. */
-		extra += mr->end - mr->start;
+		if (mr->start < PMD_SIZE)
+			extra += mr->end - mr->start;
 
 		ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	} else
author
#10 lore raw
Quoted 7 lines · Yinghai Lu
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Robin Holt

Wait.  I was wrong.  I booted the wrong kernel.  With that patch applied, the machine does boot.

Quoted 7 lines
Quoted 5 lines

Great.

Could you guys please write a usable changelog for only_need_recalculate_for_low.patch and send it to me with lkml Cc:-ed, so that I can send the fix to Linus ASAP?

please check attached one.

Your attached patch is the same as the patch I had tested. I do not have access to the machine for more than a day to test this actual patch, but as far as 'diff' can tell, the difference is commit header only.

Robin

#11 lore raw

[tip:x86/urgent] x86/mm: Only add extra pages count for the first memory range during pre-allocation early page table space

In reply to Yinghai Lu
Commit-ID:  bd2753b2dda7bb43c7468826de75f49c6a7e8965
Gitweb:     http://git.kernel.org/tip/bd2753b2dda7bb43c7468826de75f49c6a7e8965
Author:     Yinghai Lu <[email protected]>
AuthorDate: Wed, 6 Jun 2012 10:55:40 -0700
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 8 Jun 2012 11:40:50 +0200

x86/mm: Only add extra pages count for the first memory range during pre-allocation early page table space

Robin found this regression:

| I just tried to boot an 8TB system. It fails very early in boot with:
| Kernel panic - not syncing: Cannot find space for the kernel page tables

git bisect commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit does boot past that point on the 8TB configuration.

That commit will add up extra pages for all memory range even above 4g.

Try to limit that extra page count adding to first entry only.

---
 arch/x86/mm/init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/mm/init.c +2 -1
index 97141c2..bc4e9d8 100644
@@ -62,7 +62,8 @@ static void __init find_early_table_space(struct map_range *mr, unsigned long en
 		extra += PMD_SIZE;
 #endif
 		/* The first 2/4M doesn't use large pages. */
-		extra += mr->end - mr->start;
+		if (mr->start < PMD_SIZE)
+			extra += mr->end - mr->start;
 
 		ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	} else