Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9747696imu; Wed, 5 Dec 2018 09:34:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDCt7QJsfJ2Uk7w8/aAhXxRfv+rFEgTQcWY8kVrOCIN0+hTku0DQ1bmFOmQIB10vYq98ZU X-Received: by 2002:a17:902:4a0c:: with SMTP id w12mr25225843pld.8.1544031284909; Wed, 05 Dec 2018 09:34:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544031284; cv=none; d=google.com; s=arc-20160816; b=ZFyLkX/91I9eGcGEFSLpNtqP7VORWvWEjrvl20dvXL2hHsKX07WyFv721HL1Qwb+7y RtSkM63m+nw3vyNBhn05fUcW6P08M9gkaBnjNKfBhuNAOSz8cUdm4MXkhgnVPd00RtEh NV6dj2DkynqiHsOp58jv14P3tI8Bc9yUAL88nC6MwTvjbVp2K7mIaFJX8U9yR1vrK9oi /xyNNpJWyOm/Guihc4NLeq10beGozwVRVZ0s7yCZcWfdTQTfEuo73CP47PLfC9vmdXFe D0c2g7WR00YGJ+FY3k+C8cx6xLGH5CqWNO45GKMm5BXc6QUMSybEHuSUOFpEX5EnfTC5 Aefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RdrY3P1cNmaV9ItIQ4yjB9qAqpkVJ/dzzD9kY8jmt5c=; b=vOl3NUw4HuDlf5OqB1vQoheVcHL5buSue5w4GKwT9gWa6k/V8MOZ5nqiv47w9ai0wI tplgVqUqskrG/d7brQHxEHeZ0KY/SJjqByeDq1n5pTbkvxMXNYNggymtiuRjnaYgGpdT YhAGP8ymaDSgPAIN2FKH48Q4C33S3IcNvPClsqoFGnklzJN6jtopOtv5EovVCjnLJdmW N8LwfEnWohW3gDFo/YWyRZFsXME40c/KT+WvcVux6amP2OZMlggnGrM0FDtUu4ONgIrH uEeZpMHB/Ls/yimtG6QEq4l3ZO8eHoCVIci85qoHTNMLxGf0biWeSCfp2d9HCGJrD8Ga ExLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SDVRmLJo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q128si22723563pfc.179.2018.12.05.09.34.15; Wed, 05 Dec 2018 09:34:44 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SDVRmLJo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeLERcE (ORCPT + 99 others); Wed, 5 Dec 2018 12:32:04 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48150 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727475AbeLERcE (ORCPT ); Wed, 5 Dec 2018 12:32:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RdrY3P1cNmaV9ItIQ4yjB9qAqpkVJ/dzzD9kY8jmt5c=; b=SDVRmLJotdymrXNnDKMsNc3TZ aILEa+7Dn/LsKJz2L8u+TeGH3qaM9XHE85ijGedcmvmC4UvYmkNs+aGM91FbEpfWmVonSkLeWZxHD 5DhlHwsLLJ2FnzM/jbr/LIS/4uuxvrlKsWQaBf/sojsW9vphIyoCS/DUBuNIMDg1z0N0gZnp9fG/J zcAR/q3jM+D3P6PzFTGgB6wNf6VgkFs1mhRKPbiCbytkMQSB0DoN85a2BPUUrbuVTc8pFtKPVFH72 +nQ409q6abyprryoQ4m8DqmcDS1WhrYIsQhGk10/0j/El7cHOKapqQvmJxu8eCNSx8vdJ1BPBrCS3 ybCbzuULw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUb1l-00088G-HT; Wed, 05 Dec 2018 17:32:01 +0000 Date: Wed, 5 Dec 2018 09:32:01 -0800 From: Matthew Wilcox To: David Hildenbrand Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, Andrew Morton , Stephen Rothwell , Pavel Tatashin , Michal Hocko , Alexander Duyck , Anthony Yznaga , Miles Chen , yi.z.zhang@linux.intel.com, Dan Williams Subject: Re: [PATCH RFC 7/7] mm: better document PG_reserved Message-ID: <20181205173201.GA11646@bombadil.infradead.org> References: <20181205122851.5891-1-david@redhat.com> <20181205122851.5891-8-david@redhat.com> <20181205143510.GA17232@bombadil.infradead.org> <46d0e90f-f0bb-815e-7a5b-4429de1c502a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46d0e90f-f0bb-815e-7a5b-4429de1c502a@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 04:05:12PM +0100, David Hildenbrand wrote: > On 05.12.18 15:35, Matthew Wilcox wrote: > > On Wed, Dec 05, 2018 at 01:28:51PM +0100, David Hildenbrand wrote: > >> I don't see a reason why we have to document "Some of them might not even > >> exist". If there is a user, we should document it. E.g. for balloon > >> drivers we now use PG_offline to indicate that a page might currently > >> not be backed by memory in the hypervisor. And that is independent from > >> PG_reserved. > > > > I think you're confused by the meaning of "some of them might not even > > exist". What this means is that there might not be memory there; maybe > > writes to that memory will be discarded, or maybe they'll cause a machine > > check. Maybe reads will return ~0, or 0, or cause a machine check. > > We just don't know what's there, and we shouldn't try touching the memory. > > If there are users, let's document it. And I need more details for that :) > > 1. machine check: if there is a HW error, we set PG_hwpoison (except > ia64 MCA, see the list) > > 2. Writes to that memory will be discarded > > Who is the user of that? When will we have such pages right now? > > 3. Reads will return ~0, / 0? > > I think this is a special case of e.g. x86? But where do we have that, > are there any user? When there are gaps in the physical memory. As in, if you put that physical address on the bus (or in a packet), no device will respond to it. Look: 00000000-00000fff : Reserved 00001000-00057fff : System RAM 00058000-00058fff : Reserved 00059000-0009dfff : System RAM 0009e000-000fffff : Reserved Those examples I gave are examples of how various different architectures respond to "no device responded to this memory access".