From patchwork Tue Aug 4 07:24:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11699821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EA676C1 for ; Tue, 4 Aug 2020 07:24:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9B63D22C9F for ; Tue, 4 Aug 2020 07:24:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JrPJXgEv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B63D22C9F 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 74E648D0127; Tue, 4 Aug 2020 03:24:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6FE6A8D0081; Tue, 4 Aug 2020 03:24:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 614BF8D0127; Tue, 4 Aug 2020 03:24:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id 4B1F98D0081 for ; Tue, 4 Aug 2020 03:24:29 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0D621180AD804 for ; Tue, 4 Aug 2020 07:24:29 +0000 (UTC) X-FDA: 77112048258.11.truck68_2e0bd6426fa4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id D5200180F8B80 for ; Tue, 4 Aug 2020 07:24:28 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,david@redhat.com,,RULES_HIT:4423:30054:30056:30070,0,RBL:207.211.31.120:@redhat.com:.lbl8.mailshell.net-62.18.0.100 66.10.201.10;04yfb5x6gcx6u1o31394ur54m6w3iop9qw7f1o7sgopu7ikty8gw5awbh3kx4fd.ob3hewptt61fc46zwafz1pgb3zfxwmpasf78dd5za9esoqe7ss79hzreh7wyn1z.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: truck68_2e0bd6426fa4 X-Filterd-Recvd-Size: 4584 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 4 Aug 2020 07:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596525867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=JiseTXeyGcxm0IDE+cCbj3AHOMga1BCxMtg+WGu3TNY=; b=JrPJXgEvM0Ke78HL0QOSMC8dbgTYeNJicscGhN0UKH83nILVb9AR7uPi9dqrY313YYlzZV 8OHhZ5Y5kaqLZwBA8XDw3HjIwbJyz9Xifa6awKWsegz1MkxJ7kucEiMioTiWec6JifAtVL YeXCC8PtqzIY1EhCH1He6QYkbb4MUco= 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-61-nqgPXntXN3GHtsdhgNi-Ww-1; Tue, 04 Aug 2020 03:24:23 -0400 X-MC-Unique: nqgPXntXN3GHtsdhgNi-Ww-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D41D858; Tue, 4 Aug 2020 07:24:21 +0000 (UTC) Received: from t480s.redhat.com (ovpn-113-95.ams2.redhat.com [10.36.113.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BE475DA33; Tue, 4 Aug 2020 07:24:09 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Baoquan He , Jason Wang , "Michael S. Tsirkin" , Michal Hocko , Mike Kravetz , Mike Rapoport , Pankaj Gupta , Qian Cai Subject: [PATCH v3 0/6] mm / virtio-mem: support ZONE_MOVABLE Date: Tue, 4 Aug 2020 09:24:02 +0200 Message-Id: <20200804072408.5481-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Rspamd-Queue-Id: D5200180F8B80 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: @Andrew can we give this a churn and consider it for v5.9 in case there are no more comments? Patch #1-#4 have RB's, patch #5 is virtio-mem stuff maintained by me, patch #6 is just a doc update. --- Currently, virtio-mem does not really support ZONE_MOVABLE. While it allows to online fully plugged memory blocks to ZONE_MOVABLE, it does not allow to online partially-plugged memory blocks to ZONE_MOVABLE and will never consider such memory blocks when unplugging memory. This might be surprising for users (especially, if onlining suddenly fails). Let's support partially plugged memory blocks in ZONE_MOVABLE, allowing partially plugged memory blocks to be online to ZONE_MOVABLE and also unplugging from such memory blocks. This is especially helpful for testing, but also paves the way for virtio-mem optimizations, allowing more memory to get reliably unplugged. Cleanup has_unmovable_pages() and set_migratetype_isolate(), providing better documentation of how ZONE_MOVABLE interacts with different kind of unmovable pages (memory offlining vs. alloc_contig_range()). v2 -> v3: - "mm: document semantics of ZONE_MOVABLE" -- Fix a typo v1 -> v2: - "mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()" -- Move to position 1, add Fixes: tag -- Drop unused "out:" label - "mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()" -- Keep curly braces on "else" case - Replace "[PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining" by "mm: document semantics of ZONE_MOVABLE" -- Brain dump of what I know about ZONE_MOVABLE David Hildenbrand (6): mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate() mm/page_alloc: tweak comments in has_unmovable_pages() mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate() mm/page_isolation: cleanup set_migratetype_isolate() virtio-mem: don't special-case ZONE_MOVABLE mm: document semantics of ZONE_MOVABLE drivers/virtio/virtio_mem.c | 47 +++++++------------------------------ include/linux/mmzone.h | 34 +++++++++++++++++++++++++++ mm/page_alloc.c | 22 +++++------------ mm/page_isolation.c | 39 ++++++++++++++---------------- 4 files changed, 65 insertions(+), 77 deletions(-)