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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 46E05C5519F for ; Wed, 18 Nov 2020 09:01:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A3FD8221E9 for ; Wed, 18 Nov 2020 09:01:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PZC9CLY9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3FD8221E9 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 EC8126B0070; Wed, 18 Nov 2020 04:01:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E77CF6B0074; Wed, 18 Nov 2020 04:01:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D67536B0075; Wed, 18 Nov 2020 04:01:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id A5C846B0070 for ; Wed, 18 Nov 2020 04:01:02 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5A03B4DB8 for ; Wed, 18 Nov 2020 09:01:02 +0000 (UTC) X-FDA: 77496944364.26.fish72_0c092a327339 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 400031804B660 for ; Wed, 18 Nov 2020 09:01:02 +0000 (UTC) X-HE-Tag: fish72_0c092a327339 X-Filterd-Recvd-Size: 7595 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Wed, 18 Nov 2020 09:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605690061; 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: in-reply-to:in-reply-to:references:references; bh=7wqEQsvX22nx16Jojzb8KFZiOjvsM4OAXsB57jTMi5g=; b=PZC9CLY9s/Yyn8OCmHWtVgxFBV3elTmWPrb9ftwGHa0Hcazp+71EnQ2NsUaVvKAPIRPpt3 YH06qus6+2h4gbflv9p1RLNrwrreQRn5h1grSGbybvl6dRYmZNWDUanKllPUE+xcCLXuU+ Tc8kZpJt0XJN3lyGHsOIeccIgwxyRqg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-7-Q1b78oELMuy8NiNKD7BrYw-1; Wed, 18 Nov 2020 04:00:58 -0500 X-MC-Unique: Q1b78oELMuy8NiNKD7BrYw-1 Received: by mail-wr1-f70.google.com with SMTP id h11so636046wrq.20 for ; Wed, 18 Nov 2020 01:00:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7wqEQsvX22nx16Jojzb8KFZiOjvsM4OAXsB57jTMi5g=; b=Vr876pD1+CLIGrFe/V9Np4r72mwHn4RWwDXg5YHmVoeTynz/M/cmSQttVNblI9JxIc hmn2z6wwRmaLivL4AKvj5z0aTGFXJJZyE5IczvZRxANM7g1vvOdfPYg4fk5+75f39+3v /9UyITi8Fkm4B+qn41DRwVWLXgFMJCcqFKu5sTZhhHxBa00muzZ4cRxdgGvz6/fljrvt lKgB582LGrlFQu4bRyfqtPglJulqd+0uLfz+Rf0W0/WRT+DwOpjfFM4owWaSAae04j0G cYHHQOr6fvm/gjJC1aF/EdvKZY289QSD180AFQ6Jnl6wov+PPoVy6cpHgnxbUaybRfFC r1AA== X-Gm-Message-State: AOAM533I17QUMFtccakZ5ME7pJXKArs0l3Vv2hN84JLVGhtJSf7+LWhr NScXSTQwpnaupyVB7aa2Gj4JU6dB7C3NaVwszYPFt5YHP7NBPjXv77zkOKc5grYZlhFIb1KBNTj TJcqfkV6cNo4= X-Received: by 2002:a5d:44cf:: with SMTP id z15mr3616036wrr.353.1605690057459; Wed, 18 Nov 2020 01:00:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIcY5c9fabl6ughyv2LZhAK3/bgxlHsBiPuOq6RbM1KZQEh4wZshXsh3Bu1z6logi57UI1Rw== X-Received: by 2002:a5d:44cf:: with SMTP id z15mr3616013wrr.353.1605690057263; Wed, 18 Nov 2020 01:00:57 -0800 (PST) Received: from redhat.com (bzq-79-181-34-244.red.bezeqint.net. [79.181.34.244]) by smtp.gmail.com with ESMTPSA id n10sm31309533wrv.77.2020.11.18.01.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 01:00:56 -0800 (PST) Date: Wed, 18 Nov 2020 04:00:53 -0500 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, Andrew Morton , Jason Wang , Michal Hocko , Oscar Salvador , Pankaj Gupta , Wei Yang Subject: Re: [PATCH v2 00/29] virtio-mem: Big Block Mode (BBM) Message-ID: <20201118040030-mutt-send-email-mst@kernel.org> References: <20201112133815.13332-1-david@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201112133815.13332-1-david@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Thu, Nov 12, 2020 at 02:37:46PM +0100, David Hildenbrand wrote: > @Andrew, can we have an ack for patch #27, so that one can go via > the vhost tree for 5.11? OK, we got an ack, I'll put it in next now. Thanks! > --- > > virtio-mem currently only supports device block sizes that span at most > a single Linux memory block. For example, gigantic pages in the hypervisor > result on x86-64 in a device block size of 1 GiB - when the Linux memory > block size is 128 MiB, we cannot support such devices (we fail loading the > driver). Of course, we want to support any device block size in any Linux > VM. > > Bigger device block sizes will become especially important once supporting > VFIO in QEMU - each device block has to be mapped separately, and the > maximum number of mappings for VFIO is 64k. So we usually want blocks in > the gigabyte range when wanting to grow the VM big. > > Patch #1 - #10 are cleanups and optimizations > Patch #11 - #24 are refactorings to prepare for BBM > Patch #25 - #29 implement BBM, including one mm/memory_hotplug extension > > This series is based on latest linus/master and can be found at: > git@github.com:davidhildenbrand/linux.git virtio-mem-bbm-v2 > > v1 -> v2: > - Code wise, the only bigger change is using an union for sbm/bbm state > - Reworked some subjects/patch descriptions > - Reshuffled patches to make reviweing easier, and to have > cleanups+optimizations before all refactorings > - "virtio-mem: more precise calculation in > virtio_mem_mb_state_prepare_next_mb()" > -- Changed subject > -- Avoid two local variables > > David Hildenbrand (29): > virtio-mem: determine nid only once using memory_add_physaddr_to_nid() > virtio-mem: more precise calculation in > virtio_mem_mb_state_prepare_next_mb() > virtio-mem: simplify MAX_ORDER - 1 / pageblock_order handling > virtio-mem: drop rc2 in virtio_mem_mb_plug_and_add() > virtio-mem: use "unsigned long" for nr_pages when fake > onlining/offlining > virtio-mem: factor out calculation of the bit number within the > subblock bitmap > virtio-mem: print debug messages from virtio_mem_send_*_request() > virtio-mem: factor out fake-offlining into virtio_mem_fake_offline() > virtio-mem: factor out handling of fake-offline pages in memory > notifier > virtio-mem: retry fake-offlining via alloc_contig_range() on > ZONE_MOVABLE > virtio-mem: generalize check for added memory > virtio-mem: generalize virtio_mem_owned_mb() > virtio-mem: generalize virtio_mem_overlaps_range() > virtio-mem: drop last_mb_id > virtio-mem: don't always trigger the workqueue when offlining memory > virtio-mem: generalize handling when memory is getting onlined > deferred > virito-mem: document Sub Block Mode (SBM) > virtio-mem: memory block states are specific to Sub Block Mode (SBM) > virito-mem: subblock states are specific to Sub Block Mode (SBM) > virtio-mem: nb_sb_per_mb and subblock_size are specific to Sub Block > Mode (SBM) > virtio-mem: memory block ids are specific to Sub Block Mode (SBM) > virito-mem: existing (un)plug functions are specific to Sub Block Mode > (SBM) > virtio-mem: memory notifier callbacks are specific to Sub Block Mode > (SBM) > virtio-mem: factor out adding/removing memory from Linux > virtio-mem: Big Block Mode (BBM) memory hotplug > virtio-mem: allow to force Big Block Mode (BBM) and set the big block > size > mm/memory_hotplug: extend offline_and_remove_memory() to handle more > than one memory block > virtio-mem: Big Block Mode (BBM) - basic memory hotunplug > virtio-mem: Big Block Mode (BBM) - safe memory hotunplug > > drivers/virtio/virtio_mem.c | 1789 +++++++++++++++++++++++++---------- > mm/memory_hotplug.c | 105 +- > 2 files changed, 1376 insertions(+), 518 deletions(-) > > -- > 2.26.2