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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 6E1A2C2D0DB for ; Mon, 27 Jan 2020 13:25:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3AAD020702 for ; Mon, 27 Jan 2020 13:25:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AAD020702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C56F16B0003; Mon, 27 Jan 2020 08:25:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C07D06B0006; Mon, 27 Jan 2020 08:25:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1D056B0007; Mon, 27 Jan 2020 08:25:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 99AED6B0003 for ; Mon, 27 Jan 2020 08:25:56 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 33B8A181AEF09 for ; Mon, 27 Jan 2020 13:25:56 +0000 (UTC) X-FDA: 76423487112.11.watch68_50e1942cb3310 X-HE-Tag: watch68_50e1942cb3310 X-Filterd-Recvd-Size: 5319 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Mon, 27 Jan 2020 13:25:55 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id m10so8569252wmc.0 for ; Mon, 27 Jan 2020 05:25:55 -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=iO8Nq5ANy7SDhXxDPNCNJQFw5qpt4WCvMkrabZ+Lf80=; b=d9MqwAS6QprLsdy25wfCy1WJ4gRUJCeha0i3XRTIzEx8ku6OeCJfmeRCrCLdZ60oSB 5yuAxr6Q41WSniKsSTuGkfrjSGzE36rhYlvMXRMXoXYKyX2AT3pF52Z0nGcQkLU00ijw MaXjseHTX1sYOccwpclUy48FrOth6lfVRLJbvEMuUz8gV+dEkGpzBOzThpHcIDTlWMBz QNzlMIFQG/zHhBTYLxKH+vi2wR7VyNRQzG/mNWpc6q0hUl43cMG1vIOi/BeUigKO80GN M/1uL9EaLitQTEaM+GReu/glScoiIHTsWMNXuYCYO5MMiz+0t6ZxEInXC30RGuuW7L2I 38cA== X-Gm-Message-State: APjAAAUejEWqnkT4PCNxunK9POPQid8WWG+OZjIel3AzBvtbAERDqnGu DqYARJer4aQCn44wRntgaHE= X-Google-Smtp-Source: APXvYqwNt0V8dd/uQdyi0Gh4XKbuOXu/pspIccoPwyDuO4kgH+ltAOpvYylp25Y3jS0jJtrpAFHGEg== X-Received: by 2002:a1c:545d:: with SMTP id p29mr14682548wmi.91.1580131554566; Mon, 27 Jan 2020 05:25:54 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id n3sm19981965wmc.27.2020.01.27.05.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 05:25:53 -0800 (PST) Date: Mon, 27 Jan 2020 14:25:52 +0100 From: Michal Hocko To: David Hildenbrand Cc: "Fontenot, Nathan" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dan Williams , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , powerpc-utils-devel@googlegroups.com, util-linux@vger.kernel.org, Badari Pulavarty , Robert Jennings , Heiko Carstens , Karel Zak Subject: Re: [PATCH RFC] drivers/base/memory.c: indicate all memory blocks as removable Message-ID: <20200127132552.GG1183@dhcp22.suse.cz> References: <20200124155336.17126-1-david@redhat.com> <20200127092334.GB1183@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 27-01-20 10:33:55, David Hildenbrand wrote: > On 27.01.20 10:23, Michal Hocko wrote: > > On Fri 24-01-20 13:10:22, Fontenot, Nathan wrote: > >> It's been awhile since I've looked at the powerpc-utils drmgr command and > >> pseries DLPAR code but a quick scan makes and it appears that it hasn't changed > >> too much. Given that, some thoughts. > >> > >> The sysfs 'removable' file was a great help when memory DLPAR was driven > >> from userspace in the powerpc-utils drmgr command. Having this check did improve > >> performance though I can't point to any numbers. > > > > Do you still have an access to the HW to give it a try? > > > >> Currently, memory DLPAR is done completely in the kernel. The request is > >> initiated from drmgr writing to /sys/kernel/dlpar (for pHyp partitions) > >> or from a hotplug interrupt (for guests). I don't believe the 'removable' > >> sysfs file is used in either of these paths by drmgr. The only time it is > >> used is on older kernels that do not support in-kernel memory DLPAR. > >> > >> Given this, I don't think removing the 'removable' sysfs file would cause any > >> issues for the drmgr command. The only scenario I can think of is using an old > >> version of drmgr that does not support in-kernel memory DLPAR on a new kernel > >> where the 'removable' sysfs file has been removed. This doesn't seem likely > >> though and drmgr could be updated to detect this. > > > > Thanks for the information! > > > > (weird, I never received the mail from Nathan - mail deliver issues > brighten my Mondays :) ) > > Thanks for the information! Looks like powerpc indeed can live without > the interface (old userspace on shiny new kernel would in the worst case > simply be slower). > > Of course, the alternative to returning always "removable" would be to > drop the attribute completely. So, if the "removable" attribute is not > present > > - powerpc-utils will fallback to "removable" > - lsmem will fallback to "not removable". Could be because it assumes > "old kernel with lacking offlining capability". > > I don't know how likely it is that this could break custom scripts that > used the returned value for any purpose (e.g., use it as an indicator if > memory offlining is supported at all etc.). Our long term tradition with user visible knobs is to keep them in place and simply fake the answer. This seems to be a safer option and less likely to lead to failures. -- Michal Hocko SUSE Labs