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=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 78380C433DB for ; Fri, 22 Jan 2021 03:34:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B25523884 for ; Fri, 22 Jan 2021 03:34:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B25523884 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+MQ89ruUyVcMTYpxPHke7cbgndIyVE6rpa4w+fhbrT4=; b=PaiqO+1nkeJkwPtOE6GMjTE6a erlByG/l56bOyl8aXhdWdiuugxdsMYSl1PycrJ63w8J9dzu/kOaOV30PhV9nms6T0LU9W+es1yDOh UZ1Qvt6QeJk3KHLC9mQ6Sa0yARBGfDbQNUrDRXB+FG+XAfDn+HaXaFeV1CmVmQ8vP7LftEw58+YX7 V3F/3yUZhT6ZfvyzL/Tlb93EWOO5r3PFYyISM7++nT7mGG3t+ztCHJXYUvJmvDpX0SYFayMcBG70N U7XZTuMwl9XKNhg1TXLFrcLYyoKIy0c9qCd6nkBFXazx1t8jLbHKXPvAZhTFaQSGfNPmMZV/guJ8+ y4tGgTHkA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2nBn-0003fn-Bn; Fri, 22 Jan 2021 03:32:47 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2nBk-0003ez-NC for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 03:32:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6862E11D4; Thu, 21 Jan 2021 19:32:39 -0800 (PST) Received: from [192.168.0.130] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 774FC3F68F; Thu, 21 Jan 2021 19:32:32 -0800 (PST) Subject: Re: [PATCH RFC] virtio-mem: check against memhp_get_pluggable_range() which memory we can hotplug To: David Hildenbrand , linux-mm@kvack.org, akpm@linux-foundation.org, hca@linux.ibm.com, catalin.marinas@arm.com References: <1610975582-12646-1-git-send-email-anshuman.khandual@arm.com> <1610975582-12646-5-git-send-email-anshuman.khandual@arm.com> <36a10a6f-a2c7-b108-5054-5e4f3e1a1daf@redhat.com> From: Anshuman Khandual Message-ID: <99c20d27-b759-73b3-c8a0-68365a3ef943@arm.com> Date: Fri, 22 Jan 2021 09:02:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <36a10a6f-a2c7-b108-5054-5e4f3e1a1daf@redhat.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_223244_880344_17E62A8C X-CRM114-Status: GOOD ( 15.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-s390@vger.kernel.org, Wei Yang , Vasily Gorbik , "Michael S. Tsirkin" , Jason Wang , Pankaj Gupta , linux-kernel@vger.kernel.org, Michal Hocko , Pankaj Gupta , teawater , Jonathan Cameron , Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Oscar Salvador Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/21/21 3:27 PM, David Hildenbrand wrote: > On 18.01.21 14:21, Anshuman Khandual wrote: >> >> >> On 1/18/21 6:43 PM, Anshuman Khandual wrote: >>> From: David Hildenbrand >>> >>> Right now, we only check against MAX_PHYSMEM_BITS - but turns out there >>> are more restrictions of which memory we can actually hotplug, especially >>> om arm64 or s390x once we support them: we might receive something like >>> -E2BIG or -ERANGE from add_memory_driver_managed(), stopping device >>> operation. >>> >>> So, check right when initializing the device which memory we can add, >>> warning the user. Try only adding actually pluggable ranges: in the worst >>> case, no memory provided by our device is pluggable. >>> >>> In the usual case, we expect all device memory to be pluggable, and in >>> corner cases only some memory at the end of the device-managed memory >>> region to not be pluggable. >>> >>> Cc: "Michael S. Tsirkin" >>> Cc: Jason Wang >>> Cc: Pankaj Gupta >>> Cc: Michal Hocko >>> Cc: Oscar Salvador >>> Cc: Wei Yang >>> Cc: Andrew Morton >>> Cc: catalin.marinas@arm.com >>> Cc: teawater >>> Cc: Anshuman Khandual >>> Cc: Pankaj Gupta >>> Cc: Jonathan Cameron >>> Cc: hca@linux.ibm.com >>> Cc: Vasily Gorbik >>> Cc: Will Deacon >>> Cc: Ard Biesheuvel >>> Cc: Mark Rutland >>> Cc: Heiko Carstens >>> Cc: Michal Hocko >>> Signed-off-by: David Hildenbrand >>> Signed-off-by: Anshuman Khandual >> >> Hello David, >> >> As your original patch was in the RFC state, I have just maintained >> the same here as well. But once you test this patch along with the >> new series, please do let me know if this needs to be converted to >> a normal PATCH instead. Thank you. > > Yes, you can drop the RFC part. I assume you'll send another revision, > I'll do another test there, thanks! Sure, will drop the RFC in next version. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel