Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4378618ybl; Mon, 9 Dec 2019 09:49:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwpteo9/qP+dXdaeMUOEbCsMyH8zdGi1+UYh1eC1nTVX7EJPuCGFW3bPcqxZhu/+E9fMgKI X-Received: by 2002:aca:fdd7:: with SMTP id b206mr202975oii.35.1575913778807; Mon, 09 Dec 2019 09:49:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575913778; cv=none; d=google.com; s=arc-20160816; b=g0o07YfLafZhwHdgtSn9WjrI3lV2MMt8iUSeFaJgl3e9jtVwyWQNvKZNM1IMZc/rfk rFGPzyNHLYv7P35yFvch6QIx3XWU6O96jeVIzHFE1a8EesP7YRnH2xoqRMEAASeUwiOi A9BBsxH9LwpKxiHXnq6efz7cGET8zMQVzk7OKUqAS6/Up30W5BGbOKgr4cFLl0ccRHux 2S6xFki9vYpm4CEyaxtsJZMDDp/bpGv9xhYhAm/juoREgWJ/F01eat5SokABIAHP++bg ZaaO2YjbkV1icEBaVVRq3VrUeCDqmyuTGHiRP1rIZdD2jhOXpeWrQ2KAPV4mEQmt96qe CSCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JCwJwup/hRzgIhZKGZMuQ2SMWqtkRFnNSa3fE8jcXRM=; b=TzUYZ3GI/TvbicQf/e5zBRvGlBOIiiJwIVqV3fOHAnPwd2mbbW715ONNlqOK3xdjuZ S+rQRWCXD0x/rRYD6OwiXcPqYV6dbWN+LHs32KSGuCleqWi8juILRzUZuHMOVGd6XunC DeENn1vhEsziqlowzj0VEVqIZ25yVOsh5v6hU5NiiAxqwR8GudHH3onzD7IMNifwC9BL FZcn55+w+lUShM3vHY+0QHjlcmQ/RCmWPnIlFLv4vM3BAFMqSJgv+C9RYXy5RNMJFFeR sjTBKNMOD7SPYwLUFBw/CKkg8Xyy4OGvTT+nh5BYWIUoBHggts7S29nFuuxfXTWPMiTu Hk/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B0OaSziR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t185si291709oib.39.2019.12.09.09.49.25; Mon, 09 Dec 2019 09:49:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B0OaSziR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbfLIRsu (ORCPT + 99 others); Mon, 9 Dec 2019 12:48:50 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37875 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726598AbfLIRst (ORCPT ); Mon, 9 Dec 2019 12:48:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575913728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JCwJwup/hRzgIhZKGZMuQ2SMWqtkRFnNSa3fE8jcXRM=; b=B0OaSziRfZnokdoLZxC2izfMAZiWCyla/F/ZcEigmXTg0/aqctEK8SQq9W5lpDzcGsF+YH ov5KGvpGV1AjSpCbfvOVzySMOuv7mao0tHt2aEkv//xV5TPZgtvsASAN37c7hM9abXq2nr EwV7x45DSSdTI/YVMD3gEyOiHr+puq8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-J6AlubJ8OhOXKJ4FOeNQtw-1; Mon, 09 Dec 2019 12:48:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B114D1005513; Mon, 9 Dec 2019 17:48:42 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-214.ams2.redhat.com [10.36.116.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2062F1001B03; Mon, 9 Dec 2019 17:48:36 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Alexey Dobriyan , Andrew Morton , Bob Picco , Daniel Jordan , Dan Williams , Michal Hocko , Michal Hocko , Naoya Horiguchi , Oscar Salvador , Pavel Tatashin , Stephen Rothwell , Steven Sistare Subject: [PATCH v1 0/3] mm: fix max_pfn not falling on section boundary Date: Mon, 9 Dec 2019 18:48:33 +0100 Message-Id: <20191209174836.11063-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: J6AlubJ8OhOXKJ4FOeNQtw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Playing with different memory sizes for a x86-64 guest, I discovered that some memmaps (highest section if max_mem does not fall on the section boundary) are marked as being valid and online, but contain garbage. We have to properly initialize these memmaps. Looking at /proc/kpageflags and friends, I found some more issues, partially related to this. David Hildenbrand (3): mm: fix uninitialized memmaps on a partially populated last section fs/proc/page.c: allow inspection of last section and fix end detection mm: initialize memmap of unavailable memory directly fs/proc/page.c | 15 ++++++++++++--- include/linux/mm.h | 6 ------ mm/page_alloc.c | 43 ++++++++++++++++++++++++++++++++----------- 3 files changed, 44 insertions(+), 20 deletions(-) --=20 2.21.0