Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 5:58 PM, Minchan Kim wrote: > On Thu, Nov 29, 2012 at 04:53:15PM -0800, Nitin Gupta wrote: >> On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim wrote: >> > On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: >> >> On 11/28/2012 11:45 PM, Minchan Kim wrote: >> >> >On Mo

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Minchan Kim
On Thu, Nov 29, 2012 at 04:53:15PM -0800, Nitin Gupta wrote: > On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim wrote: > > On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: > >> On 11/28/2012 11:45 PM, Minchan Kim wrote: > >> >On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: > >

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim wrote: > On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: >> On 11/28/2012 11:45 PM, Minchan Kim wrote: >> >On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: >> >>Adds zs_get_object_size(handle) which provides the size of >> >>the

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Minchan Kim
On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: > On 11/28/2012 11:45 PM, Minchan Kim wrote: > >On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: > >>Adds zs_get_object_size(handle) which provides the size of > >>the given object. This is useful since the user (zram etc.) >

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Nitin Gupta
On 11/28/2012 11:45 PM, Minchan Kim wrote: On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: Adds zs_get_object_size(handle) which provides the size of the given object. This is useful since the user (zram etc.) now do not have to maintain object sizes separately, saving on some metad

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-28 Thread Minchan Kim
On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: > Adds zs_get_object_size(handle) which provides the size of > the given object. This is useful since the user (zram etc.) > now do not have to maintain object sizes separately, saving > on some metadata size (4b per page). > > The objec

[PATCH 1/2] zsmalloc: add function to query object size

2012-11-26 Thread Nitin Gupta
Adds zs_get_object_size(handle) which provides the size of the given object. This is useful since the user (zram etc.) now do not have to maintain object sizes separately, saving on some metadata size (4b per page). The object handle encodes pair which currently points to the start of the object.