From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 7B92A6B0390 for ; Tue, 28 Mar 2017 03:22:15 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id 191so26745602pga.23 for ; Tue, 28 Mar 2017 00:22:15 -0700 (PDT) Received: from dggrg01-dlp.huawei.com ([45.249.212.187]) by mx.google.com with ESMTPS id q1si3292761pgn.400.2017.03.28.00.22.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 28 Mar 2017 00:22:14 -0700 (PDT) From: Yisheng Xie Subject: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. Message-ID: Date: Tue, 28 Mar 2017 15:20:22 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com Cc: linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Hi, all, We had backport the no-lru migration to linux-4.1, meanwhile change the ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). It rarely happen, and presently, what I get is: [6823.316528s]obj=a160701f, obj_idx=15, class{size:2176,objs_per_zspage:15,pages_per_zspage:8} [...] [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:1458/zs_map_object()! ----> BUG_ON(!page[1]) It seems that we have allocated an object from a ZS_FULL group? (Actuallyi 1/4 ? I do not get the inuse number of this zspage, which I am trying to.) And presently, I can not find why it happened. Any idea about it? Any comment is more than welcome! Thanks Yisheng Xie -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 106716B0390 for ; Tue, 28 Mar 2017 20:25:17 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id m1so800978pgd.13 for ; Tue, 28 Mar 2017 17:25:17 -0700 (PDT) Received: from lgeamrelo13.lge.com (LGEAMRELO13.lge.com. [156.147.23.53]) by mx.google.com with ESMTP id q188si3894321pfb.323.2017.03.28.17.25.15 for ; Tue, 28 Mar 2017 17:25:16 -0700 (PDT) Date: Wed, 29 Mar 2017 09:20:29 +0900 From: Minchan Kim Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. Message-ID: <20170329002029.GA18979@bbox> References: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Yisheng Xie Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Hello, On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: > Hi, all, >=20 > We had backport the no-lru migration to linux-4.1, meanwhile change the > ZS=5FMAX=5FZSPAGE=5FORDER to 3. Then we met a BUG=5FON(!page[1]). Hmm, I don't know how you backported. There isn't any problem with default ZS=5FMAX=5FZSPAGE=5FORDER. Right? So, it happens only if you changed it to 3? Could you tell me what is your base kernel? and what zram/zsmalloc version(ie, from what kernel version) you backported to your base kernel? >=20 > It rarely happen, and presently, what I get is: > [6823.316528s]obj=3Da160701f, obj=5Fidx=3D15, class{size:2176,objs=5Fper= =5Fzspage:15,pages=5Fper=5Fzspage:8} > [...] > [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:= 1458/zs=5Fmap=5Fobject()! ----> BUG=5FON(!page[1]) >=20 > It seems that we have allocated an object from a ZS=5FFULL group? > (Actually=EF=BC=8C I do not get the inuse number of this zspage, which I = am trying to.) > And presently, I can not find why it happened. Any idea about it? Although it happens rarely, always above same symptom once it happens? >=20 > Any comment is more than welcome! >=20 > Thanks > Yisheng Xie >=20 >=20 >=20 > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 361046B0390 for ; Wed, 29 Mar 2017 02:43:19 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id j4so2671265pfc.8 for ; Tue, 28 Mar 2017 23:43:19 -0700 (PDT) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com. [2607:f8b0:400e:c05::242]) by mx.google.com with ESMTPS id w13si6452676pgm.221.2017.03.28.23.43.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 23:43:18 -0700 (PDT) Received: by mail-pg0-x242.google.com with SMTP id 79so1473548pgf.0 for ; Tue, 28 Mar 2017 23:43:18 -0700 (PDT) Date: Wed, 29 Mar 2017 15:42:06 +0900 From: Sergey Senozhatsky Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. Message-ID: <20170329064206.GA512@tigerII.localdomain> References: <20170329002029.GA18979@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170329002029.GA18979@bbox> Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim , Yisheng Xie Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo On (03/29/17 09:20), Minchan Kim wrote: > Hello, > > On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: > > Hi, all, > > > > We had backport the no-lru migration to linux-4.1, meanwhile change the > > ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). > > Hmm, I don't know how you backported. > > There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? > So, it happens only if you changed it to 3? I agree with Minchan. too much things could have gone wrong during the backport. > Could you tell me what is your base kernel? and what zram/zsmalloc > version(ie, from what kernel version) you backported to your > base kernel? agree again. Yisheng, do you have this commit applied? commit c102f07ca0b04f2cb49cfc161c83f6239d17f491 Author: Junil Lee Date: Wed Jan 20 14:58:18 2016 -0800 zsmalloc: fix migrate_zspage-zs_free race condition -ss -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id 0AC696B039F for ; Wed, 29 Mar 2017 03:53:05 -0400 (EDT) Received: by mail-wm0-f69.google.com with SMTP id r20so2843781wmd.20 for ; Wed, 29 Mar 2017 00:53:04 -0700 (PDT) Received: from dggrg02-dlp.huawei.com ([45.249.212.188]) by mx.google.com with ESMTPS id i186si6214680wmg.124.2017.03.29.00.53.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 29 Mar 2017 00:53:03 -0700 (PDT) From: Yisheng Xie Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. References: <20170329002029.GA18979@bbox> Message-ID: <4026833d-d639-eb62-c3a8-5c3403ab105f@huawei.com> Date: Wed, 29 Mar 2017 15:51:23 +0800 MIME-Version: 1.0 In-Reply-To: <20170329002029.GA18979@bbox> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Hi Minchan, Thanks for your comment! On 2017/3/29 8:20, Minchan Kim wrote: > Hello, > > On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >> Hi, all, >> >> We had backport the no-lru migration to linux-4.1, meanwhile change the >> ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). > > Hmm, I don't know how you backported. Yes, maybe caused by our unsuitable backport. > > There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? > So, it happens only if you changed it to 3? I will check whether it will default ZS_MAX_ZSPAGE_ORDER. > > Could you tell me what is your base kernel? and what zram/zsmalloc > version(ie, from what kernel version) you backported to your > base kernel? > We backport from kernel v4.8-rc8 to kernel v4.1. >> >> It rarely happen, and presently, what I get is: >> [6823.316528s]obj=a160701f, obj_idx=15, class{size:2176,objs_per_zspage:15,pages_per_zspage:8} >> [...] >> [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:1458/zs_map_object()! ----> BUG_ON(!page[1]) >> >> It seems that we have allocated an object from a ZS_FULL group? >> (Actuallyi 1/4 ? I do not get the inuse number of this zspage, which I am trying to.) >> And presently, I can not find why it happened. Any idea about it? > > Although it happens rarely, always above same symptom once it happens? Yes , though the class size is not the same, which means not from the same class. however, the (obj_idx == objs_per_zspage) is always true. Thanks Yisheng Xie. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by kanga.kvack.org (Postfix) with ESMTP id DE2EE6B039F for ; Wed, 29 Mar 2017 03:54:59 -0400 (EDT) Received: by mail-wr0-f199.google.com with SMTP id z109so1341996wrb.1 for ; Wed, 29 Mar 2017 00:54:59 -0700 (PDT) Received: from dggrg02-dlp.huawei.com ([45.249.212.188]) by mx.google.com with ESMTPS id f74si6257827wmi.20.2017.03.29.00.54.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 29 Mar 2017 00:54:58 -0700 (PDT) Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. References: <20170329002029.GA18979@bbox> <20170329064206.GA512@tigerII.localdomain> From: Yisheng Xie Message-ID: Date: Wed, 29 Mar 2017 15:53:21 +0800 MIME-Version: 1.0 In-Reply-To: <20170329064206.GA512@tigerII.localdomain> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Sergey Senozhatsky , Minchan Kim Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Hi Sergey, Thanks for your comment! On 2017/3/29 14:42, Sergey Senozhatsky wrote: > On (03/29/17 09:20), Minchan Kim wrote: >> Hello, >> >> On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >>> Hi, all, >>> >>> We had backport the no-lru migration to linux-4.1, meanwhile change the >>> ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). >> >> Hmm, I don't know how you backported. >> >> There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? >> So, it happens only if you changed it to 3? > > I agree with Minchan. too much things could have gone wrong during the backport. > >> Could you tell me what is your base kernel? and what zram/zsmalloc >> version(ie, from what kernel version) you backported to your >> base kernel? > > agree again. > > > > Yisheng, do you have this commit applied? No, we missed this patch, I will try it. Really thanks for that. Thanks Yisheng Xie > > commit c102f07ca0b04f2cb49cfc161c83f6239d17f491 > Author: Junil Lee > Date: Wed Jan 20 14:58:18 2016 -0800 > > zsmalloc: fix migrate_zspage-zs_free race condition > > > -ss > > . > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754608AbdC1HWN (ORCPT ); Tue, 28 Mar 2017 03:22:13 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:4800 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754313AbdC1HWM (ORCPT ); Tue, 28 Mar 2017 03:22:12 -0400 From: Yisheng Xie Subject: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. To: , , CC: , Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Message-ID: Date: Tue, 28 Mar 2017 15:20:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.58DA0ED2.0084,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c708e4a6873542a908c95c27ca915580 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, all, We had backport the no-lru migration to linux-4.1, meanwhile change the ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). It rarely happen, and presently, what I get is: [6823.316528s]obj=a160701f, obj_idx=15, class{size:2176,objs_per_zspage:15,pages_per_zspage:8} [...] [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:1458/zs_map_object()! ----> BUG_ON(!page[1]) It seems that we have allocated an object from a ZS_FULL group? (Actually, I do not get the inuse number of this zspage, which I am trying to.) And presently, I can not find why it happened. Any idea about it? Any comment is more than welcome! Thanks Yisheng Xie From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932701AbdC2AZS convert rfc822-to-8bit (ORCPT ); Tue, 28 Mar 2017 20:25:18 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:52530 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932352AbdC2AZR (ORCPT ); Tue, 28 Mar 2017 20:25:17 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.26 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Wed, 29 Mar 2017 09:20:29 +0900 From: Minchan Kim To: Yisheng Xie CC: , , , Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. Message-ID: <20170329002029.GA18979@bbox> References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB03/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/29 09:20:31, Serialize by Router on LGEKRMHUB03/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/29 09:20:31 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: > Hi, all, > > We had backport the no-lru migration to linux-4.1, meanwhile change the > ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). Hmm, I don't know how you backported. There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? So, it happens only if you changed it to 3? Could you tell me what is your base kernel? and what zram/zsmalloc version(ie, from what kernel version) you backported to your base kernel? > > It rarely happen, and presently, what I get is: > [6823.316528s]obj=a160701f, obj_idx=15, class{size:2176,objs_per_zspage:15,pages_per_zspage:8} > [...] > [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:1458/zs_map_object()! ----> BUG_ON(!page[1]) > > It seems that we have allocated an object from a ZS_FULL group? > (Actually, I do not get the inuse number of this zspage, which I am trying to.) > And presently, I can not find why it happened. Any idea about it? Although it happens rarely, always above same symptom once it happens? > > Any comment is more than welcome! > > Thanks > Yisheng Xie > > > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbdC2GnV (ORCPT ); Wed, 29 Mar 2017 02:43:21 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34464 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbdC2GnT (ORCPT ); Wed, 29 Mar 2017 02:43:19 -0400 Date: Wed, 29 Mar 2017 15:42:06 +0900 From: Sergey Senozhatsky To: Minchan Kim , Yisheng Xie Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. Message-ID: <20170329064206.GA512@tigerII.localdomain> References: <20170329002029.GA18979@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170329002029.GA18979@bbox> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/29/17 09:20), Minchan Kim wrote: > Hello, > > On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: > > Hi, all, > > > > We had backport the no-lru migration to linux-4.1, meanwhile change the > > ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). > > Hmm, I don't know how you backported. > > There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? > So, it happens only if you changed it to 3? I agree with Minchan. too much things could have gone wrong during the backport. > Could you tell me what is your base kernel? and what zram/zsmalloc > version(ie, from what kernel version) you backported to your > base kernel? agree again. Yisheng, do you have this commit applied? commit c102f07ca0b04f2cb49cfc161c83f6239d17f491 Author: Junil Lee Date: Wed Jan 20 14:58:18 2016 -0800 zsmalloc: fix migrate_zspage-zs_free race condition -ss From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754211AbdC2HxD (ORCPT ); Wed, 29 Mar 2017 03:53:03 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4844 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753716AbdC2HxB (ORCPT ); Wed, 29 Mar 2017 03:53:01 -0400 From: Yisheng Xie Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. To: Minchan Kim References: <20170329002029.GA18979@bbox> CC: , , , Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo Message-ID: <4026833d-d639-eb62-c3a8-5c3403ab105f@huawei.com> Date: Wed, 29 Mar 2017 15:51:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20170329002029.GA18979@bbox> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.58DB67D0.0197,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b8c4ccf6664ea8bf7c03e0529a362986 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minchan, Thanks for your comment! On 2017/3/29 8:20, Minchan Kim wrote: > Hello, > > On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >> Hi, all, >> >> We had backport the no-lru migration to linux-4.1, meanwhile change the >> ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). > > Hmm, I don't know how you backported. Yes, maybe caused by our unsuitable backport. > > There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? > So, it happens only if you changed it to 3? I will check whether it will default ZS_MAX_ZSPAGE_ORDER. > > Could you tell me what is your base kernel? and what zram/zsmalloc > version(ie, from what kernel version) you backported to your > base kernel? > We backport from kernel v4.8-rc8 to kernel v4.1. >> >> It rarely happen, and presently, what I get is: >> [6823.316528s]obj=a160701f, obj_idx=15, class{size:2176,objs_per_zspage:15,pages_per_zspage:8} >> [...] >> [6823.316619s]BUG: failure at /home/ethan/kernel/linux-4.1/mm/zsmalloc.c:1458/zs_map_object()! ----> BUG_ON(!page[1]) >> >> It seems that we have allocated an object from a ZS_FULL group? >> (Actually, I do not get the inuse number of this zspage, which I am trying to.) >> And presently, I can not find why it happened. Any idea about it? > > Although it happens rarely, always above same symptom once it happens? Yes , though the class size is not the same, which means not from the same class. however, the (obj_idx == objs_per_zspage) is always true. Thanks Yisheng Xie. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754551AbdC2Hy6 (ORCPT ); Wed, 29 Mar 2017 03:54:58 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4845 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753932AbdC2Hy5 (ORCPT ); Wed, 29 Mar 2017 03:54:57 -0400 Subject: Re: [RFC]mm/zsmalloc,: trigger BUG_ON in function zs_map_object. To: Sergey Senozhatsky , Minchan Kim References: <20170329002029.GA18979@bbox> <20170329064206.GA512@tigerII.localdomain> CC: , , , Linux Kernel Mailing List , Xishi Qiu , Hanjun Guo From: Yisheng Xie Message-ID: Date: Wed, 29 Mar 2017 15:53:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20170329064206.GA512@tigerII.localdomain> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0201.58DB6844.021D,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b8c4ccf6664ea8bf7c03e0529a362986 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergey, Thanks for your comment! On 2017/3/29 14:42, Sergey Senozhatsky wrote: > On (03/29/17 09:20), Minchan Kim wrote: >> Hello, >> >> On Tue, Mar 28, 2017 at 03:20:22PM +0800, Yisheng Xie wrote: >>> Hi, all, >>> >>> We had backport the no-lru migration to linux-4.1, meanwhile change the >>> ZS_MAX_ZSPAGE_ORDER to 3. Then we met a BUG_ON(!page[1]). >> >> Hmm, I don't know how you backported. >> >> There isn't any problem with default ZS_MAX_ZSPAGE_ORDER. Right? >> So, it happens only if you changed it to 3? > > I agree with Minchan. too much things could have gone wrong during the backport. > >> Could you tell me what is your base kernel? and what zram/zsmalloc >> version(ie, from what kernel version) you backported to your >> base kernel? > > agree again. > > > > Yisheng, do you have this commit applied? No, we missed this patch, I will try it. Really thanks for that. Thanks Yisheng Xie > > commit c102f07ca0b04f2cb49cfc161c83f6239d17f491 > Author: Junil Lee > Date: Wed Jan 20 14:58:18 2016 -0800 > > zsmalloc: fix migrate_zspage-zs_free race condition > > > -ss > > . >