lkml.org 
[lkml]   [2018]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Use higher-order pages in vmalloc
On Thu 22-02-18 04:22:54, Matthew Wilcox wrote:
> On Thu, Feb 22, 2018 at 07:59:43AM +0100, Michal Hocko wrote:
> > On Wed 21-02-18 09:01:29, Matthew Wilcox wrote:
> > > Right. It helps with fragmentation if we can keep higher-order
> > > allocations together.
> >
> > Hmm, wouldn't it help if we made vmalloc pages migrateable instead? That
> > would help the compaction and get us to a lower fragmentation longterm
> > without playing tricks in the allocation path.
>
> I was wondering about that possibility. If we want to migrate a page
> then we have to shoot down the PTE across all CPUs, copy the data to the
> new page, and insert the new PTE. Copying 4kB doesn't take long; if you
> have 12GB/s (current example on Wikipedia: dual-channel memory and one
> DDR2-800 module per channel gives a theoretical bandwidth of 12.8GB/s)
> then we should be able to copy a page in 666ns). So there's no problem
> holding a spinlock for it.
>
> But we can't handle a fault in vmalloc space today. It's handled in
> arch-specific code, see vmalloc_fault() in arch/x86/mm/fault.c
> If we're going to do this, it'll have to be something arches opt into
> because I'm not taking on the job of fixing every architecture!

yes.

> > Maybe we should consider kvmalloc for the kernel stack?
>
> We'd lose the guard page, so it'd have to be something we let the
> sysadmin decide to do.

ohh, right, I forgot about the guard page.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-02-22 14:37    [W:0.194 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site