Message ID | 20201022125835.26396-1-osalvador@suse.de (mailing list archive) |
---|---|
Headers | show |
Series | Allocate memmap from hotadded memory (per device) | expand |
> This does not go without saying that the patchset is not 100% complete. > It is missing: > > - a way to disable memmap_on_memory (either sysfs or boot_time cmd) > - atm, arch_add_memory for s390 screams if an altmap is passed. > I am still thinking of a way to nicely drop handle that. > Maybe a function in s390 that sets memmap_on_memory false and > stuff that check in support_memmap_on_memory function. Or simply implement altmap support ... shouldn't be too hard :)
On Thu, Oct 22, 2020 at 03:01:44PM +0200, David Hildenbrand wrote: > > This does not go without saying that the patchset is not 100% complete. > > It is missing: > > > > - a way to disable memmap_on_memory (either sysfs or boot_time cmd) > > - atm, arch_add_memory for s390 screams if an altmap is passed. > > I am still thinking of a way to nicely drop handle that. > > Maybe a function in s390 that sets memmap_on_memory false and > > stuff that check in support_memmap_on_memory function. > > Or simply implement altmap support ... shouldn't be too hard :) Yeah, I guess so, but first I would like to have everything else settled. So, gentle ping :-)
On 27.10.20 16:40, Oscar Salvador wrote: > On Thu, Oct 22, 2020 at 03:01:44PM +0200, David Hildenbrand wrote: >>> This does not go without saying that the patchset is not 100% complete. >>> It is missing: >>> >>> - a way to disable memmap_on_memory (either sysfs or boot_time cmd) >>> - atm, arch_add_memory for s390 screams if an altmap is passed. >>> I am still thinking of a way to nicely drop handle that. >>> Maybe a function in s390 that sets memmap_on_memory false and >>> stuff that check in support_memmap_on_memory function. >> >> Or simply implement altmap support ... shouldn't be too hard :) > > Yeah, I guess so, but first I would like to have everything else settled. > So, gentle ping :-) > I'm planning on looking into patch #2/3 later this or next week (this week is open source summit / KVM Forum). One thing to look into right now is how to make this fly this with vmemmap optimizations for hugetlb pages. https://lkml.kernel.org/r/20201026145114.59424-1-songmuchun@bytedance.com
On Tue, Oct 27, 2020 at 04:44:33PM +0100, David Hildenbrand wrote: > I'm planning on looking into patch #2/3 later this or next week (this week > is open source summit / KVM Forum). Sure, aprecciated the time ;-) > > One thing to look into right now is how to make this fly this with vmemmap > optimizations for hugetlb pages. > > https://lkml.kernel.org/r/20201026145114.59424-1-songmuchun@bytedance.com I was about to have a look at that series eitherway, but good you mentioned.
On 10/27/20 8:58 AM, Oscar Salvador wrote: > On Tue, Oct 27, 2020 at 04:44:33PM +0100, David Hildenbrand wrote: >> I'm planning on looking into patch #2/3 later this or next week (this week >> is open source summit / KVM Forum). > > Sure, aprecciated the time ;-) > >> >> One thing to look into right now is how to make this fly this with vmemmap >> optimizations for hugetlb pages. >> >> https://lkml.kernel.org/r/20201026145114.59424-1-songmuchun@bytedance.com > > I was about to have a look at that series eitherway, but good you mentioned. > More eyes on that series would be appreciated. That series will dynamically free and allocate memmap pages as hugetlb pages are allocated or freed. I haven't looked through this series, but my first thought is that we would need to ensure those allocs/frees are directed to the device. Not sure if there are interfaces for that.
On 28.10.20 19:47, Mike Kravetz wrote: > On 10/27/20 8:58 AM, Oscar Salvador wrote: >> On Tue, Oct 27, 2020 at 04:44:33PM +0100, David Hildenbrand wrote: >>> I'm planning on looking into patch #2/3 later this or next week (this week >>> is open source summit / KVM Forum). >> >> Sure, aprecciated the time ;-) >> >>> >>> One thing to look into right now is how to make this fly this with vmemmap >>> optimizations for hugetlb pages. >>> >>> https://lkml.kernel.org/r/20201026145114.59424-1-songmuchun@bytedance.com >> >> I was about to have a look at that series eitherway, but good you mentioned. >> > > More eyes on that series would be appreciated. > > That series will dynamically free and allocate memmap pages as hugetlb > pages are allocated or freed. I haven't looked through this series, but > my first thought is that we would need to ensure those allocs/frees are > directed to the device. Not sure if there are interfaces for that. Directing to the device might be part of the solution, but does not have to be. You really want to free the pages to the OS in the end, otherwise you lose the whole benefit of the vmemmap optimization. You would want to actually free the pages (making sure whatever generic_online_page() does was done to these special vmemmap pages). But then, you cannot simply skip all X first pages of a memory block when offlining, you can only skip the once that are still vmemmap pages (e.g., marked via page type), and have to isolate/migrate off the no-longer vmemmap pages.