From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 408A5CA9EA0 for ; Tue, 22 Oct 2019 09:27:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 023212064B for ; Tue, 22 Oct 2019 09:27:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LQGpiNGR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 023212064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A47426B0003; Tue, 22 Oct 2019 05:27:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D0316B0006; Tue, 22 Oct 2019 05:27:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8703D6B0007; Tue, 22 Oct 2019 05:27:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 5B4876B0003 for ; Tue, 22 Oct 2019 05:27:31 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id E09BC180ACF0D for ; Tue, 22 Oct 2019 09:27:30 +0000 (UTC) X-FDA: 76070892660.21.mine22_418dbdc60cf5d X-HE-Tag: mine22_418dbdc60cf5d X-Filterd-Recvd-Size: 4573 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 09:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571736449; 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: in-reply-to:in-reply-to:references:references; bh=4RFIlZRmmV3hFstILOKd0/m47lPLMEdxfpFwPiVzbAs=; b=LQGpiNGRUecBB+i1RZ9yYjetebKzMvgNUucKdR7gSAJFslG6zEoRx5OHnZxZM/LjdXDuRK dPmoJnHv0um0rtm2qKaxX4fkIx9sMcRkQmoa1oMxI1tXWLAZ7J8a/80xSu3BrgST675PRk HzCObZQokKi/N2x3j+hlLMnmU5hx0cg= 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-86-jgijt8P-Pyexl-3Jlz0aeQ-1; Tue, 22 Oct 2019 05:27:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 992E51800E01; Tue, 22 Oct 2019 09:27:22 +0000 (UTC) Received: from [10.36.117.11] (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 621B85C22C; Tue, 22 Oct 2019 09:27:19 +0000 (UTC) Subject: Re: [PATCH v2 0/2] mm: Memory offlining + page isolation cleanups To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Duyck , Andrew Morton , Anshuman Khandual , Dan Williams , Mel Gorman , Mike Rapoport , Mike Rapoport , Oscar Salvador , Pavel Tatashin , Pavel Tatashin , Pingfan Liu , Qian Cai , Vlastimil Babka , Wei Yang References: <20191021172353.3056-1-david@redhat.com> <25d3f071-3268-298b-e0c8-9c307d1015fe@redhat.com> <20191022080835.GZ9379@dhcp22.suse.cz> <1f56744d-2c22-6c12-8fe8-4a71e791c467@redhat.com> <20191022082131.GC9379@dhcp22.suse.cz> <20191022091431.GG9379@dhcp22.suse.cz> <68d6da35-276c-0491-99ea-8249dee8fd1d@redhat.com> <20191022092454.GI9379@dhcp22.suse.cz> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <8f5a1d58-6b1a-eef3-b482-ff113425fa65@redhat.com> Date: Tue, 22 Oct 2019 11:27:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191022092454.GI9379@dhcp22.suse.cz> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: jgijt8P-Pyexl-3Jlz0aeQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 22.10.19 11:24, Michal Hocko wrote: > On Tue 22-10-19 11:17:24, David Hildenbrand wrote: >> On 22.10.19 11:14, Michal Hocko wrote: >>> On Tue 22-10-19 10:32:11, David Hildenbrand wrote: >>> [...] >>>> E.g., arch/x86/kvm/mmu.c:kvm_is_mmio_pfn() >>> >>> Thanks for these references. I am not really familiar with kvm so I >>> cannot really comment on the specific code but I am wondering why >>> it simply doesn't check for ZONE_DEVICE explicitly? Also we do care >>> about holes in RAM (from the early boot), those should be reserved >>> already AFAIR. So we are left with hotplugged memory with holes and >>> I am not really sure we should bother with this until there is a clear >>> usecase in sight. >> >> Well, checking for ZONE_DEVICE is only possible if you have an initializ= ed >> memmap. And that is not guaranteed when you start mapping random stuff i= nto >> your guest via /dev/mem. >=20 > Yes, I can understand that part but checking PageReserved on an > uninitialized memmap is pointless as well. So if you can test for it you That's why I add pfn_to_online_page() :) > can very well test for ZONE_DEVICE as well. PageReserved -> ZONE_DEVICE > is a terrible assumption. Indeed, it is. But there are more parts in the kernel that I'll be=20 fixing. Stay tuned. --=20 Thanks, David / dhildenb