Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1864633imm; Thu, 24 May 2018 01:57:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo8QmzAQ/qzRFrJKDvXFkAIcUPVsWl2dIoBxGz8odEEObc1+rFly/RlykVWW2JlWCZEovhw X-Received: by 2002:a17:902:268:: with SMTP id 95-v6mr6500277plc.386.1527152264217; Thu, 24 May 2018 01:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527152264; cv=none; d=google.com; s=arc-20160816; b=uL5rVM0KMPtbv6/QqSZjCN0rEJyPBcSmhBxUDfz2ZXi03OUi+BkLfK5iyV/DTFMUYm qn8UGVIJSyEh46s60TrQjRSeLJ8shBk3Sordvu7x4XChr1f9EmxB1cqw8Wb+9vUKG9py nJKAKaSF7ureRgUCzUMi1z4tLdVG2LPmg7lQM82TYGXHG+kx7UJrdX4c778mqnh6s75p uyDcr04QtdEYNKnS2nZoXJBdRUJyS1t6ZIjTqsfTryB6BZS77y+8CmNpMcmIm2h15mAW cRZA8je6NjGg4h7yHUACkw2MLECpnD0FQAwKwOl9aj8d+0OmZHsQweXAQQZtxiRyhmzm SSdQ== 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:arc-authentication-results; bh=bkHoDq2m5ZScOcR8CbwJDCzmuN2ve3d9g0H++0caImo=; b=ab4C8Q0Omwd+ot7d170DFwY/t6QQiuQjdE7NXJp5V9EBgYvWgJ5JBH3C1OsU2qP5JT rw1B8LIhhzOK+4zByYs2NzVN4f2fibOFWAnTeBtR/4Ng0lcykTBE26jEofnJ+xPXT3Kh jwrnATTMPFtNrJyiodVv+d8Y4gDTwq66cc68Hm+JAgohdWjQkLJqNOPT4TnnghiKf9lL ttWjSZccLCwfOk0vWNMslRYw7YRppwm8t6HwV25W9w24Y1z+zDxXVtTc4cMSWgDW8TeX +gIOjit9aXM4pLDJ/eNbOk1MOoZXC9KNEMywdKkjEfabs5VOzpZyGSRlKgWvqCm25pFZ PdaA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 o9-v6si21270817pfk.276.2018.05.24.01.57.29; Thu, 24 May 2018 01:57:44 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965655AbeEXI4g (ORCPT + 99 others); Thu, 24 May 2018 04:56:36 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965188AbeEXI4a (ORCPT ); Thu, 24 May 2018 04:56:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84C5E818BAF0; Thu, 24 May 2018 08:56:29 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-77.pek2.redhat.com [10.72.12.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8425C2024CA1; Thu, 24 May 2018 08:56:15 +0000 (UTC) Date: Thu, 24 May 2018 16:56:11 +0800 From: Dave Young To: David Hildenbrand Cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Alexander Potapenko , Andrew Morton , Andrey Ryabinin , Balbir Singh , Baoquan He , Benjamin Herrenschmidt , Boris Ostrovsky , Dan Williams , Dmitry Vyukov , Greg Kroah-Hartman , Hari Bathini , Huang Ying , Hugh Dickins , Ingo Molnar , Jaewon Kim , Jan Kara , =?iso-8859-1?B?Suly9G1l?= Glisse , Joonsoo Kim , Juergen Gross , Kate Stewart , "Kirill A. Shutemov" , Matthew Wilcox , Mel Gorman , Michael Ellerman , Miles Chen , Oscar Salvador , Paul Mackerras , Pavel Tatashin , Philippe Ombredanne , Rashmica Gupta , Reza Arbab , Souptick Joarder , Tetsuo Handa , Thomas Gleixner , Vlastimil Babka Subject: Re: [PATCH v1 00/10] mm: online/offline 4MB chunks controlled by device driver Message-ID: <20180524085610.GA5467@dhcp-128-65.nay.redhat.com> References: <20180523151151.6730-1-david@redhat.com> <20180524075327.GU20441@dhcp22.suse.cz> <14d79dad-ad47-f090-2ec0-c5daf87ac529@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14d79dad-ad47-f090-2ec0-c5daf87ac529@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 24 May 2018 08:56:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 24 May 2018 08:56:29 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dyoung@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, [snip] > > > >> For kdump and onlining/offlining code, we > >> have to mark pages as offline before a new segment is visible to the system > >> (e.g. as these pages might not be backed by real memory in the hypervisor). > > > > Please expand on the kdump part. That is really confusing because > > hotplug should simply not depend on kdump at all. Moreover why don't you > > simply mark those pages reserved and pull them out from the page > > allocator? > > 1. "hotplug should simply not depend on kdump at all" > > In theory yes. In the current state we already have to trigger kdump to > reload whenever we add/remove a memory block. > > > 2. kdump part > > Whenever we offline a page and tell the hypervisor about it ("unplug"), > we should not assume that we can read that page again. Now, if dumping > tools assume they can read all memory that is offline, we are in trouble. > > It is the same thing as we already have with Pg_hwpoison. Just a > different meaning - "don't touch this page, it is offline" compared to > "don't touch this page, hw is broken". Does that means in case an offline no kdump reload as mentioned in 1)? If we have the offline event and reload kdump, I assume the memory state is refreshed so kdump will not read the memory offlined, am I missing something? > > Balloon drivers solve this problem by always allowing to read unplugged > memory. In virtio-mem, this cannot and should even not be guaranteed. > Hmm, that sounds a bug.. > And what we have to do to make this work is actually pretty simple: Just > like Pg_hwpoison, track per page if it is online and provide this > information to kdump. > > Thanks Dave