From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757574AbbGGOeF (ORCPT ); Tue, 7 Jul 2015 10:34:05 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:35655 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756962AbbGGOd5 (ORCPT ); Tue, 7 Jul 2015 10:33:57 -0400 Date: Tue, 7 Jul 2015 23:33:47 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCH v6 6/7] zsmalloc: account the number of compacted pages Message-ID: <20150707143347.GA23003@blaptop> References: <1436270221-17844-1-git-send-email-sergey.senozhatsky@gmail.com> <1436270221-17844-7-git-send-email-sergey.senozhatsky@gmail.com> <20150707133916.GC3898@blaptop> <20150707142109.GA1450@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150707142109.GA1450@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 07, 2015 at 11:21:09PM +0900, Sergey Senozhatsky wrote: > On (07/07/15 22:39), Minchan Kim wrote: > [..] > > > struct zs_pool_stats { > > > - /* How many objects were migrated */ > > > - u64 num_migrated; > > > + /* How many pages were migrated (freed) */ > > > + u64 pages_compacted; > > > > Hmm, if we account it as page unit, unsigned long is enough for 32bit. > > Well, this is a 'how many pages were freed overall' counter. We don't > control the lifetime of device, so I think it can be bigger than 4 bytes > in some `extreme' cases. Technically, you're right but we have been used "unsigned long" for seval mm stats for a long time. For exmaple, vm_event_item. It includes many stats accumulated for the system running time. I don't think zsmalloc is special. > > -ss -- Kind regards, Minchan Kim