Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303159 > unrolled thread
| Started by | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| First post | 2016-01-07 01:00 +0100 |
| Last post | 2016-01-07 01:20 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
weird DirectMap2M accounting. Dave Jones <davej@codemonkey.org.uk> - 2016-01-07 01:00 +0100
Re: weird DirectMap2M accounting. Dave Jones <davej@codemonkey.org.uk> - 2016-01-07 01:20 +0100
Re: weird DirectMap2M accounting. Thomas Gleixner <tglx@linutronix.de> - 2016-01-11 10:00 +0100
Re: weird DirectMap2M accounting. Dave Jones <davej@codemonkey.org.uk> - 2016-01-07 01:20 +0100
| From | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| Date | 2016-01-07 01:00 +0100 |
| Subject | weird DirectMap2M accounting. |
| Message-ID | <qO69I-88W-17@gated-at.bofh.it> |
I just spotted this in /proc/meminfo on an old Core2 machine with 4G. DirectMap2M: 18446744073709543424 kB Looks like we subtracted 8192 from 0 somewhere. Should split_page_count() be checking that direct_pages_count > 0 ? Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| Date | 2016-01-07 01:20 +0100 |
| Message-ID | <qO6t3-5O-1@gated-at.bofh.it> |
| In reply to | #1303159 |
On Wed, Jan 06, 2016 at 07:11:41PM -0500, Dave Jones wrote: > On Wed, Jan 06, 2016 at 06:55:27PM -0500, Dave Jones wrote: > > I just spotted this in /proc/meminfo on an old Core2 machine with 4G. > > > > DirectMap2M: 18446744073709543424 kB > > > > Looks like we subtracted 8192 from 0 somewhere. > > > > Should split_page_count() be checking that direct_pages_count > 0 ? > > Ok, this diff makes that number print out as 0. > > If this looks ok, I'll submit it properly, though I'd like to better > understand what's happening here. Shouldn't I have 2M pages ? Ah. We disable them when compiling with DEBUG_PAGEALLOC. So this is only needed in that case. If people think it's worth an ifdef for those two added lines I'll add it, but it seems pretty benign to just always check. thoughts? Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2016-01-11 10:00 +0100 |
| Message-ID | <qPGuu-8mW-5@gated-at.bofh.it> |
| In reply to | #1303199 |
On Wed, 6 Jan 2016, Dave Jones wrote: > On Wed, Jan 06, 2016 at 07:11:41PM -0500, Dave Jones wrote: > > On Wed, Jan 06, 2016 at 06:55:27PM -0500, Dave Jones wrote: > > > I just spotted this in /proc/meminfo on an old Core2 machine with 4G. > > > > > > DirectMap2M: 18446744073709543424 kB > > > > > > Looks like we subtracted 8192 from 0 somewhere. > > > > > > Should split_page_count() be checking that direct_pages_count > 0 ? > > > > Ok, this diff makes that number print out as 0. > > > > If this looks ok, I'll submit it properly, though I'd like to better > > understand what's happening here. Shouldn't I have 2M pages ? > > Ah. We disable them when compiling with DEBUG_PAGEALLOC. > So this is only needed in that case. > If people think it's worth an ifdef for those two added lines I'll add it, > but it seems pretty benign to just always check. Agreed. tglx
[toc] | [prev] | [next] | [standalone]
| From | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| Date | 2016-01-07 01:20 +0100 |
| Message-ID | <qO6t3-5O-3@gated-at.bofh.it> |
| In reply to | #1303159 |
On Wed, Jan 06, 2016 at 06:55:27PM -0500, Dave Jones wrote:
> I just spotted this in /proc/meminfo on an old Core2 machine with 4G.
>
> DirectMap2M: 18446744073709543424 kB
>
> Looks like we subtracted 8192 from 0 somewhere.
>
> Should split_page_count() be checking that direct_pages_count > 0 ?
Ok, this diff makes that number print out as 0.
If this looks ok, I'll submit it properly, though I'd like to better
understand what's happening here. Shouldn't I have 2M pages ?
Dave
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index a3137a4feed1..ff0e0c6c350e 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -66,6 +66,9 @@ void update_page_count(int level, unsigned long pages)
static void split_page_count(int level)
{
+ if (direct_pages_count[level] == 0)
+ return;
+
direct_pages_count[level]--;
direct_pages_count[level - 1] += PTRS_PER_PTE;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web