Re: Ways to deprecate /sys/devices/system/memory/memoryX/phys_device ?
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2020-09-25 15:00:06
Also in:
linux-mm, lkml
On Fri, Sep 25, 2020 at 04:49:28PM +0200, David Hildenbrand wrote:
quoted
quoted
There were once RFC patches to make use of it in ACPI, but it could be solved using different interfaces [1]. While I'd love to rip it out completely, I think it would break old lsmem/chmem completely - and I assume that's not acceptable. I was wondering what would be considered safe to do now/in the future: 1. Make it always return 0 (just as if "sclp.rzm" would be set to 0 on s390x). This will make old lsmem/chmem behave differently after switching to a new kernel, like if sclp.rzm would not be set by HW - AFAIU, it will assume all memory is in a single memory increment. Do we care?No, at least not until that kernel change would be backported to some old distribution level where we still use lsmem/chmem from s390-tools. Given that this is just some clean-up w/o any functional benefit, and hopefully w/o any negative impact, I think we can safely assume that no distributor will do that "just for fun". Even if there would be good reasons for backports, then I guess we also have good reasons for backporting / switching to the util-linux version of lsmem / chmem for such distribution levels. Alternatively, adjust the s390-tools lsmem / chmem there. But I would rather "rip it out completely" than just return 0. You'd need some lsmem / chmem changes anyway, at least in case this would ever be backported.Thanks for your input Gerald. So unless people would be running shiny new kernels on older distributions it shouldn't be a problem (and I don't think we care too much about something like that). I don't expect something like that to get backported - there is absolutely no reason to do so IMHO.
We do care about this, Andrew used to have an old Fedora 9 box or something like that, that he tourtured many of us with bug reports when we broke it :) So watch out, people keep old userspace around for much longer than you can possibly imagine because they don't like having their use-cases in userspace change, and we have made the guarantee to them that they _CAN_ trust us to not break things in userspace. It's a slow age-out, but watch out, you might have to revert things... good luck! greg k-h