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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87C58C433F5 for ; Tue, 30 Nov 2021 23:57:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 817956B0072; Tue, 30 Nov 2021 18:56:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 79FAF6B0074; Tue, 30 Nov 2021 18:56:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 619196B0075; Tue, 30 Nov 2021 18:56:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 4C8676B0072 for ; Tue, 30 Nov 2021 18:56:57 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 14EE018088FBB for ; Tue, 30 Nov 2021 23:56:47 +0000 (UTC) X-FDA: 78867259254.20.4B6790E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 60E86700009B for ; Tue, 30 Nov 2021 23:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638316605; 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=+4Ly6xHNhtVUY3AH8Qlby8GSJHjPJLpcoba68bX+aow=; b=ITitGQyBGs3UnbFdtMFkhl6mWHPhqEnV2z0bIMyBPHVumLaujIFJMmkCr1uBLmskjOInKc XFx/+kUXu2xFvctFWVzLDUuYX/RkcQ2djKqYnhQzZyubXpE6p6PF+2iA5TJE19K8ZlPo9s +kIEy5GiXm7kGEUkDbZncXEV3i1I2YM= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-108-jLKZWWMmMYaNksBHQGyOmw-1; Tue, 30 Nov 2021 18:56:43 -0500 X-MC-Unique: jLKZWWMmMYaNksBHQGyOmw-1 Received: by mail-wm1-f72.google.com with SMTP id r129-20020a1c4487000000b00333629ed22dso14691823wma.6 for ; Tue, 30 Nov 2021 15:56:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+4Ly6xHNhtVUY3AH8Qlby8GSJHjPJLpcoba68bX+aow=; b=AbeXZzrTDX5ihW6F/4SFYUAIHnGq0NtTHPYxtfskT3EzZ+afajaaJqwVzJK715YxuK xSBGzjVrdIwIc/EhGyeW0RU/RcBiXYT/t5FhzE4UrQn1ZMgHIOvIluVcjWAJeO3VlVyW g6iNErTcpGxI3ogvEp3NbwKz0qpVAcoQwf2yq8/vPL7FAjO2Oh7mi71KD50+HhZZhli+ wIod2cnjtjgl7DxIK937xjuaNWi9cOQbgKJimiFOeHKI/BNpPg5Sf3vzFx2R7j3Yp0uU xquFd7Pi4wcthe2r/+w9FBFcYgp9ZfyKZOF1+xAMjBJUzok3cbgcGUO+oy1QUPDTuvCn mkSw== X-Gm-Message-State: AOAM533c7+Eus2GjwZJ+LgM7ify5imCTO8/zy3olkcoyBVCdA7lKOzAK 2PuDniv58sDC2oNu0hEcqaILaJS/0LH7rJFpNFvVWasnQXK6fQ0fFxKj5IZ3gnWHmVHDUZlFJgA fmmDXmbkrmPk= X-Received: by 2002:a7b:c341:: with SMTP id l1mr2507463wmj.60.1638316602491; Tue, 30 Nov 2021 15:56:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQ8RabJd/yKEXGAgH6YMRKO+2L/7mA0kjS4lJhWYXjOug4extDYcFzwzfNJvdxbSacBrlLnQ== X-Received: by 2002:a7b:c341:: with SMTP id l1mr2507417wmj.60.1638316602217; Tue, 30 Nov 2021 15:56:42 -0800 (PST) Received: from redhat.com ([2.53.15.215]) by smtp.gmail.com with ESMTPSA id g18sm17573721wrv.42.2021.11.30.15.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 15:56:41 -0800 (PST) Date: Tue, 30 Nov 2021 18:56:38 -0500 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, Jason Wang , Zi Yan , Gavin Shan , Hui Zhu , Eric Ren , Sebastien Boeuf , Pankaj Gupta , Wei Yang , virtualization@lists.linux-foundation.org, linux-mm@kvack.org Subject: Re: [PATCH v1 0/2] virtio-mem: prepare for granularity smaller than MAX_ORDER - 1 Message-ID: <20211130185612-mutt-send-email-mst@kernel.org> References: <20211126134209.17332-1-david@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211126134209.17332-1-david@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 60E86700009B X-Stat-Signature: 1hw1ng9ma74hwmpg7jk5p7jsrz4j76jo Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ITitGQyB; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf27.hostedemail.com: domain of mst@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=mst@redhat.com X-Rspamd-Server: rspam02 X-HE-Tag: 1638316606-573461 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 Fri, Nov 26, 2021 at 02:42:07PM +0100, David Hildenbrand wrote: > The virtio-mem driver currently supports logical hot(un)plug in > MAX_ORDER - 1 granularity (4MiB on x86-64) or bigger. We want to support > pageblock granularity (2MiB on x86-64), to make hot(un)plug even more > flexible, and to improve hotunplug when using ZONE_NORMAL. > > With pageblock granularity, we then have a granularity comparable to > hugepage ballooning. Further, there are ideas to increase MAX_ORDER, so > we really want to decouple it from MAX_ORDER. > > While ZONE_MOVABLE should mostly work already, alloc_contig_range() still > needs work to be able to properly handle pageblock granularity on > ZONE_NORMAL. This support is in the works [1], so let's prepare > virtio-mem for supporting smaller granularity than MAX_ORDER - 1. is there value to merging this seprately? or should this just be part of that patchset? > Tested with ZONE_MOVABLE after removing the MAX_ORDER - 1 granularity > limitation in virtio-mem, and using different device block sizes (2MiB, > 4MiB, 8MiB). > > [1] https://lkml.kernel.org/r/20211115193725.737539-1-zi.yan@sent.com > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Zi Yan > Cc: Gavin Shan > Cc: Hui Zhu > Cc: Eric Ren > Cc: Sebastien Boeuf > Cc: Pankaj Gupta > Cc: Wei Yang > Cc: virtualization@lists.linux-foundation.org > Cc: linux-mm@kvack.org > > David Hildenbrand (2): > virtio-mem: prepare page onlining code for granularity smaller than > MAX_ORDER - 1 > virtio-mem: prepare fake page onlining code for granularity smaller > than MAX_ORDER - 1 > > drivers/virtio/virtio_mem.c | 110 ++++++++++++++++++++++++------------ > 1 file changed, 74 insertions(+), 36 deletions(-) > > -- > 2.31.1