RE: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-05-10 Thread Vitaly Kuznetsov
Michael Kelley writes: > From: Vitaly Kuznetsov Sent: Friday, May 10, 2019 6:22 > AM >> >> >> >> I think we can consider these allocations being DMA-like (because >> >> Hypervisor accesses this memory too) so you can probably take a look at >> >> dma_pool_create()/dma_pool_alloc() and

RE: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-05-10 Thread Vitaly Kuznetsov
Michael Kelley writes: > From: Vitaly Kuznetsov Sent: Wednesday, May 8, 2019 > 7:55 AM >> >> >> >> Sorry, my bad: I meant to say "not cache-like" (these allocations are >> >> not 'cache') but the typo made it completely incomprehensible. >> > >> > No worries! Thank you for sharing your

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-05-08 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > I would worry that kmem_cache_alloc does not currently have same alignment > constraints. > See discussion here: > https://lwn.net/SubscriberLink/787740/a886fe4ea6681322/ I think it even was me who reported this bug with XFS originally :-) Yes, plain kmalloc()

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-05-08 Thread Vitaly Kuznetsov
Maya Nakamura writes: > On Fri, Apr 12, 2019 at 09:52:47AM +0200, Vitaly Kuznetsov wrote: >> Maya Nakamura writes: >> >> > On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote: >> >> Maya Nakamura writes: >> >> >> >> > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg);

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-05-08 Thread Maya Nakamura
On Fri, Apr 12, 2019 at 09:52:47AM +0200, Vitaly Kuznetsov wrote: > Maya Nakamura writes: > > > On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote: > >> Maya Nakamura writes: > >> > >> > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg); > >> > u32 hv_max_vp_index; >

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-04-12 Thread Vitaly Kuznetsov
Maya Nakamura writes: > On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote: >> Maya Nakamura writes: >> >> > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg); >> > u32 hv_max_vp_index; >> > EXPORT_SYMBOL_GPL(hv_max_vp_index); >> > >> > +struct kmem_cache *cachep;

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-04-12 Thread Maya Nakamura
On Fri, Apr 05, 2019 at 01:31:02PM +0200, Vitaly Kuznetsov wrote: > Maya Nakamura writes: > > > @@ -98,18 +99,20 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg); > > u32 hv_max_vp_index; > > EXPORT_SYMBOL_GPL(hv_max_vp_index); > > > > +struct kmem_cache *cachep; > > +EXPORT_SYMBOL_GPL(cachep); >

Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-04-05 Thread Vitaly Kuznetsov
Maya Nakamura writes: > Switch from the function that allocates a single Linux guest page to a > different one to use a Hyper-V page because the guest page size and > hypervisor page size concepts are different, even though they happen to > be the same value on x86. > > Signed-off-by: Maya

[PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc()

2019-04-04 Thread Maya Nakamura
Switch from the function that allocates a single Linux guest page to a different one to use a Hyper-V page because the guest page size and hypervisor page size concepts are different, even though they happen to be the same value on x86. Signed-off-by: Maya Nakamura --- arch/x86/hyperv/hv_init.c