From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758946AbcAKI66 (ORCPT ); Mon, 11 Jan 2016 03:58:58 -0500 Received: from www.linutronix.de ([62.245.132.108]:45428 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758899AbcAKI64 (ORCPT ); Mon, 11 Jan 2016 03:58:56 -0500 Date: Mon, 11 Jan 2016 09:58:01 +0100 (CET) From: Thomas Gleixner To: Dave Jones cc: Linux Kernel , x86@kernel.org Subject: Re: weird DirectMap2M accounting. In-Reply-To: <20160107001850.GA7443@codemonkey.org.uk> Message-ID: References: <20160106235527.GA14135@codemonkey.org.uk> <20160107001141.GA6595@codemonkey.org.uk> <20160107001850.GA7443@codemonkey.org.uk> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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