Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436AbcCBMb6 (ORCPT ); Wed, 2 Mar 2016 07:31:58 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:36096 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755303AbcCBMb4 (ORCPT ); Wed, 2 Mar 2016 07:31:56 -0500 Message-ID: <56D6DC13.8060008@huawei.com> Date: Wed, 2 Mar 2016 20:26:59 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: LKML , Linux MM Subject: a question about slub in function __slab_free() Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56D6DC74.011A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a0a069b5875dd474c02580a339becdcc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 464 Lines: 22 ___slab_alloc() deactivate_slab() add_full(s, n, page); The page will be added to full list and the frozen is 0, right? __slab_free() prior = page->freelist; // prior is NULL was_frozen = new.frozen; // was_frozen is 0 ... /* * Slab was on no list before and will be * partially empty * We can defer the list move and instead * freeze it. */ new.frozen = 1; ... I don't understand why "Slab was on no list before"? Thanks, Xishi Qiu