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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 F0436C76188 for ; Fri, 19 Jul 2019 06:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C311720873 for ; Fri, 19 Jul 2019 06:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563518714; bh=o+89jgjRNhqeQIUXmN+u9Pn4Z+UMYYgRdjOR1H7EkWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=hiSzomaAYK6I5L9KhGt/fjSjnslGgGtAQnsRZt9EDP7lraCpeWdpsGqUtnbUGGX/c FJ4ZVGpmCrIDA3Z+RJgEUvkjXUtWstqb4atbv8BHM/ljYoYFWJhaxAgmvdA87xb0Bn S9ptI8Ke8zP9IfTTEmLbUSpk75EYE0LEOhxtXn9E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726965AbfGSGpN (ORCPT ); Fri, 19 Jul 2019 02:45:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:37648 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725616AbfGSGpN (ORCPT ); Fri, 19 Jul 2019 02:45:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6BDADAC8F; Fri, 19 Jul 2019 06:45:11 +0000 (UTC) Date: Fri, 19 Jul 2019 08:45:10 +0200 From: Michal Hocko To: David Hildenbrand Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, Dan Williams , Wei Yang , Igor Mammedov , Martin Schwidefsky , Heiko Carstens , Mike Rapoport , Vasily Gorbik , Oscar Salvador Subject: Re: [PATCH v3 02/11] s390x/mm: Fail when an altmap is used for arch_add_memory() Message-ID: <20190719064510.GL30461@dhcp22.suse.cz> References: <20190527111152.16324-1-david@redhat.com> <20190527111152.16324-3-david@redhat.com> <20190701074306.GC6376@dhcp22.suse.cz> <20190701124628.GT6376@dhcp22.suse.cz> <86f3ff3d-d035-a806-88b7-b8c7b77c206e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86f3ff3d-d035-a806-88b7-b8c7b77c206e@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 15-07-19 12:51:27, David Hildenbrand wrote: > On 01.07.19 14:46, Michal Hocko wrote: > > On Mon 01-07-19 09:43:06, Michal Hocko wrote: > >> On Mon 27-05-19 13:11:43, David Hildenbrand wrote: > >>> ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we > >>> don't forget arch_add_memory()/arch_remove_memory() when unlocking > >>> support. > >> > >> Why do we need this? Sure ZONE_DEVICE is not supported for s390 and so > >> might be the case for other arches which support hotplug. I do not see > >> much point in adding warning to each of them. > > > > I would drop this one. If there is a strong reason to have something > > like that it should come with a better explanation and it can be done on > > top. > > > > This was requested by Dan and I agree it is the right thing to do. This is probably a matter of taste. I would argue that altmap doesn't really equal ZONE_DEVICE. This is more a mechanism to use an alternative memmap allocator. Sure ZONE_DEVICE is the only in tree user of the feature but I really do not see why the arh specific code should care about it. The lack of altmap allocator is handled in the sparse code so this is just adding an early check which might confuse people in future. > In > the context of paravirtualized devices (e.g., virtio-pmem), it makes > sense to block functionality an arch does not support. Then block it on the config dependences. -- Michal Hocko SUSE Labs