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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 EA77AC433E2 for ; Fri, 11 Sep 2020 07:20:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AF942075A for ; Fri, 11 Sep 2020 07:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AF942075A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AC8AA6B0096; Fri, 11 Sep 2020 03:20:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A79B990000D; Fri, 11 Sep 2020 03:20:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9412690000B; Fri, 11 Sep 2020 03:20:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 7C9036B0096 for ; Fri, 11 Sep 2020 03:20:38 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3C267181AEF21 for ; Fri, 11 Sep 2020 07:20:38 +0000 (UTC) X-FDA: 77249932956.13.swim20_2509e0c270ec Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 1355618140B67 for ; Fri, 11 Sep 2020 07:20:38 +0000 (UTC) X-HE-Tag: swim20_2509e0c270ec X-Filterd-Recvd-Size: 3494 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Sep 2020 07:20:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E782EACDF; Fri, 11 Sep 2020 07:20:51 +0000 (UTC) Date: Fri, 11 Sep 2020 09:20:35 +0200 From: Michal Hocko To: David Hildenbrand Cc: Dave Hansen , Gerald Schaefer , "akpm@linux-foundation.org" , Greg KH , Jan =?iso-8859-1?Q?H=F6ppner?= , Heiko Carstens , "linux-mm@kvack.org" , linux-api@vger.kernel.org, Dave Hansen , "linux-kernel@vger.kernel.org" Subject: Re: Ways to deprecate /sys/devices/system/memory/memoryX/phys_device ? Message-ID: <20200911072035.GC7986@dhcp22.suse.cz> References: <3E00A442-7107-48DA-8172-EED95F6E1663@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3E00A442-7107-48DA-8172-EED95F6E1663@redhat.com> X-Rspamd-Queue-Id: 1355618140B67 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 10-09-20 22:31:09, David Hildenbrand wrote: >=20 >=20 > > Am 10.09.2020 um 22:01 schrieb Dave Hansen : > >=20 > > =EF=BB=BFOn 9/10/20 3:20 AM, David Hildenbrand wrote: > >> I was just exploring how /sys/devices/system/memory/memoryX/phys_dev= ice > >> is/was used. It's one of these interfaces that most probably never > >> should have been added but now we are stuck with it. > >=20 > > While I'm all for cleanups, what specific problems is phys_device cau= sing? > >=20 >=20 > Mostly stumbling over it, understanding that it is basically unused > with new userspace for good reason, questioning its existence. >=20 > E.g., I am working on virtio-mem support for s390x. Displaying > misleading/wrong phys_device indications isn=E2=80=98t particularly hel= pful > - especially once there are different ways to hotplug memory for an > architecture. >=20 > > Are you hoping that we can just remove users of memoryX/* until there > > are no more left, and this is the easiest place to start? >=20 > At least reducing it to a minimum with clear semantics. Even with > automatic onlining there are still reasons why we need to keep the > interface for now (e.g., reloading kexec to update the kdump headers > on memory hot(un)plug). But also standby memory handling on s399x > requires it (->manual onlining). While I agree that the existing interface is far from ideal, I am not sure it makes much sense to invest energy into cleaning it up. We can have a pig with a lipstick but but this will not solve the underlying problem that we have I believe. The interface doesn't scale with the block count (especially on some platforms like ppc), it is too inflexible (single size of the block) and many others. I believe we need a completely new interface which would effectively deprecate the existing one. One could still chose to use the old interface but new usecases would use the new one ideally. I have brought that up earlier already without much follow up (http://lkml.kernel.org/r/20200619120704.GD12177@dhcp22.suse.cz) --=20 Michal Hocko SUSE Labs