Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-04 Thread Minchan Kim
On Wed, Mar 04, 2015 at 04:49:13PM +0900, Sergey Senozhatsky wrote: > On (03/04/15 16:06), Minchan Kim wrote: > > So are you claiming using of idr is smaller memory footprint than zram > > included > > list_head? > > I hope why you want to use idr for dynamic device management. > > > > and idr h

Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Sergey Senozhatsky
On (03/04/15 16:06), Minchan Kim wrote: > So are you claiming using of idr is smaller memory footprint than zram > included > list_head? > I hope why you want to use idr for dynamic device management. > and idr handles auto device_id generation for us, all we need to do in zram code is to pass '

Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Sergey Senozhatsky
Hello Minchan, On (03/04/15 16:06), Minchan Kim wrote: > > This patch makes some preparations for dynamic device ADD/REMOVE > > functionality > > via /dev/zram-control interface. > > > > Remove `zram_devices' array and switch to id-to-pointer translation (idr). > > idr doesn't bloat zram struct

Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Minchan Kim
Hello Sergey, Sorry for the late review. I don't grab a time to review in detail still but I saw Andrew merged it to mmotm today so at least I should ask somethings now and hope review in detail soon. On Tue, Mar 03, 2015 at 09:49:44PM +0900, Sergey Senozhatsky wrote: > This patch makes some prep

Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Sergey Senozhatsky
On (03/03/15 14:01), Andrew Morton wrote: > > This patch makes some preparations for dynamic device ADD/REMOVE > > functionality > > via /dev/zram-control interface. > > > > Remove `zram_devices' array and switch to id-to-pointer translation (idr). > > idr doesn't bloat zram struct with additiona

Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Andrew Morton
On Tue, 3 Mar 2015 21:49:44 +0900 Sergey Senozhatsky wrote: > This patch makes some preparations for dynamic device ADD/REMOVE functionality > via /dev/zram-control interface. > > Remove `zram_devices' array and switch to id-to-pointer translation (idr). > idr doesn't bloat zram struct with ad

[PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-03-03 Thread Sergey Senozhatsky
This patch makes some preparations for dynamic device ADD/REMOVE functionality via /dev/zram-control interface. Remove `zram_devices' array and switch to id-to-pointer translation (idr). idr doesn't bloat zram struct with additional members, f.e. list_head, yet still provides ability to match the

[PATCH 2/8] zram: use idr instead of `zram_devices' array

2015-02-26 Thread Sergey Senozhatsky
This patch makes some preparations for dynamic device ADD/REMOVE functionality via /dev/zram-control interface. Remove `zram_devices' array and switch to id-to-pointer translation (idr). idr doesn't bloat zram struct with additional members, f.e. list_head, yet still provides ability to match the