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.