Re: netconsole deadlock with virtnet

2020-11-17 Thread Sergey Senozhatsky
On (20/11/18 11:46), Sergey Senozhatsky wrote: [..] > > Because I'm not sure where the xmit_lock is taken while holding the > > target_list_lock. > > I don't see where does this happen. It seems to me that the report > is not about broken locking order, but

Re: netconsole deadlock with virtnet

2020-11-17 Thread Sergey Senozhatsky
On (20/11/17 09:33), Steven Rostedt wrote: > > [ 21.149601] IN-HARDIRQ-W at: > > [ 21.149602] __lock_acquire+0xa78/0x1a94 > > [ 21.149603] lock_acquire.part.0+0x170/0x360 > > [ 21.149604] lock_acquire+0x68/0x8c >

Re: [PATCH] drm/virtio: use kvmalloc for large allocations

2020-11-04 Thread Sergey Senozhatsky
Hi, On (20/11/05 07:52), Gerd Hoffmann wrote: > > - *ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry), > > - GFP_KERNEL); > > + *ents = kvmalloc_array(*nents, > > + sizeof(struct virtio_gpu_mem_entry), > > +

Re: [PATCH 15/15] block: Add FIXME comment to handle device_add_disk error

2016-08-17 Thread Sergey Senozhatsky
On (08/17/16 15:15), Fam Zheng wrote: [..] > ( > rc = device_add_disk(e1, e2, e3); > | > + /* FIXME: handle error. */ > device_add_disk(e1, e2, e3); or use __must_check for device_add_disk() function? /* which is _attribute__((warn_unused_result)) */ -ss

Re: [PATCH 11/15] zram: Pass attribute group to device_add_disk

2016-08-17 Thread Sergey Senozhatsky
On (08/18/16 10:59), Sergey Senozhatsky wrote: [..] > I like the previous "Error creating sysfs group for device" string better, > than "Error creating disk", because the latter one is much less informative. > > do you want to do something like below? >

Re: [PATCH 11/15] zram: Pass attribute group to device_add_disk

2016-08-17 Thread Sergey Senozhatsky
Hello, On (08/17/16 15:15), Fam Zheng wrote: [..] > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c > index 20920a2..2331788 100644 > --- a/drivers/block/zram/zram_drv.c > +++ b/drivers/block/zram/zram_drv.c > @@ -1298,13 +1298,10 @@ static int zram_add(void) >

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-16 Thread Sergey Senozhatsky
On (06/16/16 15:47), Minchan Kim wrote: > > [..] > > > > this is what I'm getting with the [zsmalloc: keep first object offset > > > > in struct page] > > > > applied: "count:0 mapcount:-127". which may be not related to zsmalloc > > > > at this point. > > > > > > > > kernel: BUG: Bad page stat

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Sergey Senozhatsky
On (06/16/16 13:47), Minchan Kim wrote: [..] > > this is what I'm getting with the [zsmalloc: keep first object offset in > > struct page] > > applied: "count:0 mapcount:-127". which may be not related to zsmalloc at > > this point. > > > > kernel: BUG: Bad page state in process khugepaged pfn

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Sergey Senozhatsky
On (06/16/16 11:58), Minchan Kim wrote: [..] > RAX: 2065676162726166 so rax is totally garbage, I think. > It means obj_to_head returns garbage because get_first_obj_offset is > utter crab because (page_idx / class->pages_per_zspage) was totally > wrong. > > > ^

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Sergey Senozhatsky
Hi, On (06/16/16 08:12), Minchan Kim wrote: > > [ 315.146533] kasan: CONFIG_KASAN_INLINE enabled > > [ 315.146538] kasan: GPF could be caused by NULL-ptr deref or user memory > > access > > [ 315.146546] general protection fault: [#1] PREEMPT SMP KASAN > > [ 315.146576] Modules linked in

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Sergey Senozhatsky
Hello Minchan, -next 4.7.0-rc3-next-20160614 [ 315.146533] kasan: CONFIG_KASAN_INLINE enabled [ 315.146538] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 315.146546] general protection fault: [#1] PREEMPT SMP KASAN [ 315.146576] Modules linked in: lzo zram zsmall

Re: [PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-16 Thread Sergey Senozhatsky
On (05/17/16 10:18), Minchan Kim wrote: [..] > > > #ifdef CONFIG_MIGRATION > > > > > > +extern int PageMovable(struct page *page); > > > +extern void __SetPageMovable(struct page *page, struct address_space > > > *mapping); > > > +extern void __ClearPageMovable(struct page *page); > > > extern

Re: [PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-16 Thread Sergey Senozhatsky
On (05/09/16 11:20), Minchan Kim wrote: [..] > +++ b/include/linux/migrate.h > @@ -32,11 +32,16 @@ extern char *migrate_reason_names[MR_TYPES]; > > #ifdef CONFIG_MIGRATION > > +extern int PageMovable(struct page *page); > +extern void __SetPageMovable(struct page *page, struct address_space >

Re: [PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-16 Thread Sergey Senozhatsky
On (05/09/16 11:20), Minchan Kim wrote: > +++ b/include/linux/migrate.h > @@ -32,11 +32,16 @@ extern char *migrate_reason_names[MR_TYPES]; > > #ifdef CONFIG_MIGRATION > > +extern int PageMovable(struct page *page); > +extern void __SetPageMovable(struct page *page, struct address_space > *map

Re: [PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-04-19 Thread Sergey Senozhatsky
Hello Minchan, On (04/19/16 16:51), Minchan Kim wrote: [..] > > I guess it is remained thing after I rebased to catch any mistake. > But I'm heavily chainging this part. > Please review next version instead of this after a few days. :) ah, got it. thanks! -ss ___

Re: [PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping

2016-04-18 Thread Sergey Senozhatsky
Hello, On (03/30/16 16:12), Minchan Kim wrote: [..] > +static void objidx_to_page_and_offset(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > + struct page **obj_page, > +

Re: [PATCH v3 05/16] zsmalloc: keep max_object in size_class

2016-04-18 Thread Sergey Senozhatsky
Hello, On (03/30/16 16:12), Minchan Kim wrote: > > Every zspage in a size_class has same number of max objects so > we could move it to a size_class. > Reviewed-by: Sergey Senozhatsky -ss ___ Virtualization mailing list Vi

Re: [PATCH v3 09/16] zsmalloc: move struct zs_meta from mapping to freelist

2016-04-18 Thread Sergey Senozhatsky
et_zspage_meta() helper would make this patch shorter :) Reviewed-by: Sergey Senozhatsky -ss > --- > mm/zsmalloc.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 807998462539..

Re: [PATCH v3 07/16] zsmalloc: remove page_mapcount_reset

2016-04-18 Thread Sergey Senozhatsky
Hello, On (03/30/16 16:12), Minchan Kim wrote: > We don't use page->_mapcount any more so no need to reset. > > Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky -ss > --- > mm/zsmalloc.c | 1 - > 1 file changed, 1 deletion(-) > >

Re: [PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping

2016-04-18 Thread Sergey Senozhatsky
e->mapping; seems to be common in several places, may be it makes sense to factor it out and turn into a macro or a static inline helper? other than that, looks good to me Reviewed-by: Sergey Senozhatsky -ss ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-04-17 Thread Sergey Senozhatsky
Hello Minchan, On (03/30/16 16:12), Minchan Kim wrote: [..] > @@ -1835,23 +1827,31 @@ static void __zs_compact(struct zs_pool *pool, struct > size_class *class) > if (!migrate_zspage(pool, class, &cc)) > break; > > - putbac

Re: [PATCH v3 10/16] zsmalloc: factor page chain functionality out

2016-04-17 Thread Sergey Senozhatsky
Hello, On (03/30/16 16:12), Minchan Kim wrote: > @@ -1421,7 +1434,6 @@ static unsigned long obj_malloc(struct size_class > *class, > unsigned long m_offset; > void *vaddr; > > - handle |= OBJ_ALLOCATED_TAG; a nitpick, why did you replace this ALLOCATED_TAG assignment with 2 'ha

Re: [PATCH v3 00/16] Support non-lru page migration

2016-03-30 Thread Sergey Senozhatsky
On (03/30/16 16:11), Andrew Morton wrote: [..] > > For details, please read description in > > "mm/compaction: support non-lru movable page migration". > > OK, I grabbed all these. > > I wonder about testing coverage during the -next period. How many > people are likely to exercise these code pa

Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class

2016-03-19 Thread Sergey Senozhatsky
On (03/11/16 16:30), Minchan Kim wrote: > Every zspage in a size_class has same number of max objects so > we could move it to a size_class. > > Signed-off-by: Minchan Kim > --- > mm/zsmalloc.c | 29 ++--- > 1 file changed, 14 insertions(+), 15 deletions(-) > > diff --gi

Re: [PATCH v1 05/19] zsmalloc: use first_page rather than page

2016-03-19 Thread Sergey Senozhatsky
On (03/11/16 16:30), Minchan Kim wrote: > This patch cleans up function parameter "struct page". > Many functions of zsmalloc expects that page paramter is "first_page" > so use "first_page" rather than "page" for code readability. > > Signe

Re: [PATCH v1 07/19] zsmalloc: reordering function parameter

2016-03-19 Thread Sergey Senozhatsky
On (03/11/16 16:30), Minchan Kim wrote: > This patch cleans up function parameter ordering to order > higher data structure first. > > Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky -ss ___ Virtualization

Re: [PATCH v1 08/19] zsmalloc: remove unused pool param in obj_free

2016-03-19 Thread Sergey Senozhatsky
On (03/11/16 16:30), Minchan Kim wrote: > Let's remove unused pool param in obj_free > > Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky -ss ___ Virtualization mailing list Virtualization@lists.linux-founda

Re: [PATCH v1 06/19] zsmalloc: clean up many BUG_ON

2016-03-19 Thread Sergey Senozhatsky
to see struct page's fields > 3. use those assertion in primitive functions so higher functions > can rely on the assertion in the primitive function. > 4. Don't use assertion if following instruction can trigger Oops > > Signed-off-by: Minchan Kim

Re: [PATCH v1 19/19] zram: use __GFP_MOVABLE for memory allocation

2016-03-19 Thread Sergey Senozhatsky
t; Node 0, zoneDMA32 1612 3139 3154 2469 1745990384 94 > 7 0 0 > > As you can see, compaction made so many high-order pages. Yay! > > Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky -ss

Re: [PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping

2016-03-18 Thread Sergey Senozhatsky
On (03/11/16 16:30), Minchan Kim wrote: > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > +static void objidx_to_page_and_ofs(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > +