Re: [PATCH 1/6] zsmalloc: switch from alloc_vm_area to get_vm_area

2020-09-21 Thread Christoph Hellwig
On Mon, Sep 21, 2020 at 11:42:29AM -0700, Minchan Kim wrote: > It seems zsmalloc is only customer the function so let's have the helper > when we see another customer. > > If we don't have objection, I'd like to ask to Andrew fold this up. Fine with me.

Re: [PATCH 1/6] zsmalloc: switch from alloc_vm_area to get_vm_area

2020-09-21 Thread Minchan Kim
On Mon, Sep 21, 2020 at 08:17:08PM +0200, Christoph Hellwig wrote: > On Mon, Sep 21, 2020 at 10:42:56AM -0700, Minchan Kim wrote: > > IIRC, the problem was runtime pte popluating needs GFP_KERNEL but > > zs_map_object API runs under non-preemtible section. > > Make sense. > > > > - area->vm = all

Re: [PATCH 1/6] zsmalloc: switch from alloc_vm_area to get_vm_area

2020-09-21 Thread Christoph Hellwig
On Mon, Sep 21, 2020 at 10:42:56AM -0700, Minchan Kim wrote: > IIRC, the problem was runtime pte popluating needs GFP_KERNEL but > zs_map_object API runs under non-preemtible section. Make sense. > > - area->vm = alloc_vm_area(PAGE_SIZE * 2, NULL); > > + area->vm = get_vm_area(PAGE_SIZE * 2,

Re: [PATCH 1/6] zsmalloc: switch from alloc_vm_area to get_vm_area

2020-09-21 Thread Minchan Kim
On Fri, Sep 18, 2020 at 06:37:19PM +0200, Christoph Hellwig wrote: > There is no obvious reason why zsmalloc needs to pre-fault the PTEs > given that it later uses map_kernel_range to just like vmap(). IIRC, the problem was runtime pte popluating needs GFP_KERNEL but zs_map_object API runs under n

[PATCH 1/6] zsmalloc: switch from alloc_vm_area to get_vm_area

2020-09-18 Thread Christoph Hellwig
There is no obvious reason why zsmalloc needs to pre-fault the PTEs given that it later uses map_kernel_range to just like vmap(). Signed-off-by: Christoph Hellwig --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index c36fdff9a3