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=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 DDCDAC433DF for ; Sun, 18 Oct 2020 15:29:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 42D3822203 for ; Sun, 18 Oct 2020 15:29:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VsxKuqkf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42D3822203 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 677D66B0068; Sun, 18 Oct 2020 11:29:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 626986B006C; Sun, 18 Oct 2020 11:29:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5147F6B006E; Sun, 18 Oct 2020 11:29:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id 190616B0068 for ; Sun, 18 Oct 2020 11:29:25 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9C4198249980 for ; Sun, 18 Oct 2020 15:29:24 +0000 (UTC) X-FDA: 77385430248.08.mask79_3408e942722f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 70BCC1819E76C for ; Sun, 18 Oct 2020 15:29:24 +0000 (UTC) X-HE-Tag: mask79_3408e942722f X-Filterd-Recvd-Size: 7516 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Sun, 18 Oct 2020 15:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603034963; 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=1CTKIbN/xVjEnO6qY3wyEbNeQNs54uP2PLOt/PBfoP4=; b=VsxKuqkfCZ683JEjKtfFtGsCSIozdhjKvvo1UQKPTYwZIcJ/tGuGJyokd7GPeHV1mej9Op MySwiGMMN+KDNrI2RfnRM90RatTvPcy9mHy1fPr8GJkbU4hx/DSr1FzSPB1FVoDOUnGHDj OYZzAM1gpLBpGWJHfq//XGq+mhMef0o= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383--EhnlieROqiplHNjArTT9Q-1; Sun, 18 Oct 2020 11:29:21 -0400 X-MC-Unique: -EhnlieROqiplHNjArTT9Q-1 Received: by mail-wr1-f69.google.com with SMTP id k14so6253256wrd.6 for ; Sun, 18 Oct 2020 08:29:21 -0700 (PDT) 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=1CTKIbN/xVjEnO6qY3wyEbNeQNs54uP2PLOt/PBfoP4=; b=VPLGF8uPzr3Yh1MfBJJcPOU3nIeEqezkr7VWT0oAZ85n4bJcbpTZ6GUgcZtOvaZtAl /OLooyzvU5RKV6wk4uXHZYJs4gT4x3OPQaurcCbFoH9hgAoqwB7ZFudaroO5sLO37zfJ /ZIzB8R9POLvyUph7BHmmxwDd8jGqcxMdaVqPyTApRt8Oz4+hjemnotrROvttG8yWyg1 uWf1cxJrSowfis99e4GIiBFOZRiuhEEKu9gtymols0uqfQyzA7jmgIxlzM7DSd7tR4s0 Xp6w22NuF7kintexEma+08fjM4/KPbd0fOnPhLbWeu3NgpefDZGeWsiJ5bwVYDhUx9O1 mUoA== X-Gm-Message-State: AOAM533YjM2KtBcdJagc50OlGq9czkqyoKf0egkAH/oIZeo4fPw6ZW1k oNXf6ZWbck1OClNZIk1B+7AM7t8U3Tlp5QYoUoKgRy4mCRswXHczGrGEmH2nbTyIslcfyiukdDb abh3QIjK7Cq0= X-Received: by 2002:a7b:c7c3:: with SMTP id z3mr13134902wmk.43.1603034960413; Sun, 18 Oct 2020 08:29:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdSke2D/bQ/4Rv046vND4iUOBVEXFQoAjUmmIvF3U1fKjAq8Hc0bRgog5vC4nNUSJIsqNYWw== X-Received: by 2002:a7b:c7c3:: with SMTP id z3mr13134876wmk.43.1603034960186; Sun, 18 Oct 2020 08:29:20 -0700 (PDT) Received: from redhat.com (bzq-79-176-118-93.red.bezeqint.net. [79.176.118.93]) by smtp.gmail.com with ESMTPSA id u81sm12089933wmg.43.2020.10.18.08.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Oct 2020 08:29:19 -0700 (PDT) Date: Sun, 18 Oct 2020 11:29:15 -0400 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org, Andrew Morton , Jason Wang , Michal Hocko , Oscar Salvador , Pankaj Gupta , Wei Yang Subject: Re: [PATCH v1 00/29] virtio-mem: Big Block Mode (BBM) Message-ID: <20201018112849-mutt-send-email-mst@kernel.org> References: <20201012125323.17509-1-david@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201012125323.17509-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 Mon, Oct 12, 2020 at 02:52:54PM +0200, David Hildenbrand wrote: > 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. I guess it missed this Linux right? There's an mm change which did not get an ack from mm mainatiners, so I can't merge it ... > This series: > - Performs some cleanups > - Factors out existing Sub Block Mode (SBM) > - Implements memory hot(un)plug in Big Block Mode (BBM) > > I need one core-mm change, to make offline_and_remove_memory() eat bigger > chunks. > > This series is based on "next-20201009" and can be found at: > git@gitlab.com:virtio-mem/linux.git virtio-mem-dbm-v1 > > Once some virtio-mem patches that are pending in the -mm tree are upstream > (I guess they'll go in in 5.10), I'll resend based on Linus' tree. > I suggest to take this (including the MM patch, acks/review please) via the > vhost tree once time has come. In the meantime, I'll do more testing. > > David Hildenbrand (29): > virtio-mem: determine nid only once using memory_add_physaddr_to_nid() > virtio-mem: simplify 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: 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 > virtio-mem: use "unsigned long" for nr_pages when fake > onlining/offlining > 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 > 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: factor out calculation of the bit number within the > sb_states bitmap > virito-mem: existing (un)plug functions 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 notifier callbacks are specific to Sub Block Mode > (SBM) > virtio-mem: memory block ids are specific to Sub Block Mode (SBM) > virtio-mem: factor out adding/removing memory from Linux > virtio-mem: print debug messages from virtio_mem_send_*_request() > 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 | 1783 +++++++++++++++++++++++++---------- > mm/memory_hotplug.c | 105 ++- > 2 files changed, 1373 insertions(+), 515 deletions(-) > > -- > 2.26.2