From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbcAGASz (ORCPT ); Wed, 6 Jan 2016 19:18:55 -0500 Received: from arcturus.aphlor.org ([188.246.204.175]:35816 "EHLO arcturus.aphlor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287AbcAGASw (ORCPT ); Wed, 6 Jan 2016 19:18:52 -0500 Date: Wed, 6 Jan 2016 19:18:50 -0500 From: Dave Jones To: Linux Kernel , x86@kernel.org Subject: Re: weird DirectMap2M accounting. Message-ID: <20160107001850.GA7443@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Linux Kernel , x86@kernel.org References: <20160106235527.GA14135@codemonkey.org.uk> <20160107001141.GA6595@codemonkey.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160107001141.GA6595@codemonkey.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -2.9 (--) X-Spam-Report: Spam detection software, running on the system "arcturus.aphlor.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 ? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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