lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad35cab2-ee1a-74a8-d039-9b79048a5580@redhat.com>
Date:   Fri, 23 Nov 2018 14:17:30 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Oscar Salvador <osalvador@...e.de>,
        Pavel Tatashin <pasha.tatashin@...cle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Arun KS <arunks@...eaurora.org>,
        Mathieu Malaterre <malat@...ian.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v1] mm/memory_hotplug: drop "online" parameter from
 add_memory_resource()

On 23.11.18 14:05, Michal Hocko wrote:
> On Fri 23-11-18 13:58:16, David Hildenbrand wrote:
>> On 23.11.18 13:54, Michal Hocko wrote:
>>> On Fri 23-11-18 13:37:40, David Hildenbrand wrote:
>>>> User space should always be in charge of how to online memory and
>>>> if memory should be onlined automatically in the kernel. Let's drop the
>>>> parameter to overwrite this - XEN passes memhp_auto_online, just like
>>>> add_memory(), so we can directly use that instead internally.
>>>
>>> Heh, I wanted to get rid of memhp_auto_online so much and now we have it
>>> in the core memory_hotplug. Not a win on my side I would say :/
>>
>> That is actually a good point: Can we remove memhp_auto_online or is it
>> already some sort of kernel ABI?
>>
>> (as it is exported via /sys/devices/system/memory/auto_online_blocks)
> 
> I have tried and there was a pushback [1]. That led to a rework of the
> sysfs semantic of onlining btw. The biggest objection against removing was
> that the userspace might be too slow to online memory and memmaps could
> eat the available memory and trigger OOM. That is why I've started
> working on the self hosted memmpas but failed to finish it. Fortunatelly
> Oscar is brave enough to continue in that work.

Yes I saw that work :) . I wonder if it is really an issue or can we
worked around. At least for paravirtualized devices (a.k.a. balloon
devices) - even without the memmaps rework.

E.g. only add a new memory block in case the old one was onlined. And we
get that information via register_memory_notifier(). So we would always
only have one memory block "pending to be onlined".

That's at least my plan for virtio-mem (add one block at a time). The
problem is if some external entity triggers memory hotplug of actual
devices you cannot simply control. Like adding a bunch of ACPI DIMMs in
one shot without userspace being able to keep up.

But the memmaps thingy still is very valuable when wanting to add memory
in an environment where we are already low on memory.

> 
> [1] http://lkml.kernel.org/r/20170227092817.23571-1-mhocko@kernel.org
> 


-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ