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: <9673cceb-afae-ae77-1bd8-56e07c814cc0@redhat.com>
Date:   Thu, 1 Aug 2019 10:44:35 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     akpm@...ux-foundation.org, dan.j.williams@...el.com,
        pasha.tatashin@...een.com, mhocko@...e.com,
        anshuman.khandual@....com, Jonathan.Cameron@...wei.com,
        vbabka@...e.cz, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 0/5] Allocate memmap from hotadded memory

On 01.08.19 10:39, Oscar Salvador wrote:
> On Thu, Aug 01, 2019 at 10:17:23AM +0200, David Hildenbrand wrote:
>> I am not yet sure about two things:
>>
>>
>> 1. Checking uninitialized pages for PageVmemmap() when onlining. I
>> consider this very bad.
>>
>> I wonder if it would be better to remember for each memory block the pfn
>> offset, which will be used when onlining/offlining.
>>
>> I have some patches that convert online_pages() to
>> __online_memory_block(struct memory block *mem) - which fits perfect to
>> the current user. So taking the offset and processing only these pages
>> when onlining would be easy. To do the same for offline_pages(), we
>> first have to rework memtrace code. But when offlining, all memmaps have
>> already been initialized.
> 
> This is true, I did not really like that either, but was one of the things
> I came up.
> I already have some ideas how to avoid checking the page, I will work on it.

I think it would be best if we find some way that during
onlining/offlining we skip the vmemmap part completely. (e.g., as
discussed via an offset in the memblock or similar)

> 
>> 2. Setting the Vmemmap pages to the zone of the online type. This would
>> mean we would have unmovable data on pages marked to belong to the
>> movable zone. I would suggest to always set them to the NORMAL zone when
>> onlining - and inititalize the vmemmap of the vmemmap pages directly
>> during add_memory() instead.
> 
> IMHO, having vmemmap pages in ZONE_MOVABLE do not matter that match.
> They are not counted as managed_pages, and they are not show-stopper for
> moving all the other data around (migrate), they are just skipped.
> Conceptually, they are not pages we can deal with.

I am not sure yet about the implications of having these belong to a
zone they don't hmmmm. Will the pages be PG_reserved?

> 
> I thought they should lay wherever the range lays.
> Having said that, I do not oppose to place them in ZONE_NORMAL, as they might
> fit there better under the theory that ZONE_NORMAL have memory that might not be
> movable/migratable.
> 
> As for initializing them in add_memory(), we cannot do that.
> First problem is that we first need sparse_mem_map_populate to create
> the mapping, and to take the pages from our altmap.
> 
> Then, we can access and initialize those pages.
> So we cannot do that in add_memory() because that happens before.
> 
> And I really think that it fits much better in __add_pages than in add_memory.

Sorry, I rather meant when adding memory, not when onlining. But you
seem to do that already. :)

> 
> Given said that, I would appreciate some comments in patches#3 and patches#4,
> specially patch#4.

Will have a look!

> So I would like to collect some feedback in those before sending a new version.
> 
> Thanks David
> 


-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ