From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbcDRAbh (ORCPT ); Sun, 17 Apr 2016 20:31:37 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36692 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbcDRAbf (ORCPT ); Sun, 17 Apr 2016 20:31:35 -0400 Date: Mon, 18 Apr 2016 09:33:05 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jlayton@poochiereds.net, bfields@fieldses.org, Vlastimil Babka , Joonsoo Kim , koct9i@gmail.com, aquini@redhat.com, virtualization@lists.linux-foundation.org, Mel Gorman , Hugh Dickins , Sergey Senozhatsky , Rik van Riel , rknize@motorola.com, Gioh Kim , Sangseok Lee , Chan Gyun Jeong , Al Viro , YiPing Xu Subject: Re: [PATCH v3 10/16] zsmalloc: factor page chain functionality out Message-ID: <20160418003305.GA5882@swordfish> References: <1459321935-3655-1-git-send-email-minchan@kernel.org> <1459321935-3655-11-git-send-email-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459321935-3655-11-git-send-email-minchan@kernel.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 'handle | OBJ_ALLOCATED_TAG'? -ss > obj = get_freeobj(first_page); > objidx_to_page_and_offset(class, first_page, obj, > &m_page, &m_offset); > @@ -1431,10 +1443,10 @@ static unsigned long obj_malloc(struct size_class *class, > set_freeobj(first_page, link->next >> OBJ_ALLOCATED_TAG); > if (!class->huge) > /* record handle in the header of allocated chunk */ > - link->handle = handle; > + link->handle = handle | OBJ_ALLOCATED_TAG; > else > /* record handle in first_page->private */ > - set_page_private(first_page, handle); > + set_page_private(first_page, handle | OBJ_ALLOCATED_TAG); > kunmap_atomic(vaddr); > mod_zspage_inuse(first_page, 1); > zs_stat_inc(class, OBJ_USED, 1);