Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-20 Thread Minchan Kim
On Wed, Aug 20, 2014 at 03:53:18PM +0900, Minchan Kim wrote: > On Wed, Aug 20, 2014 at 02:26:50AM -0400, David Horner wrote: > > On Tue, Aug 19, 2014 at 3:54 AM, Minchan Kim wrote: > > > Normally, zram user could get maximum memory usage zram consumed > > > via polling mem_used_total with sysfs in

Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-20 Thread David Horner
I'm really surprised there isn't an atomic_set_max function - that keeps trying the exchange until the target value is equal or greater than provided value. (and complimentary atomic_set_min) I would be surprised that this is the only place in the kernel with this scenario. On Wed, Aug 20, 2014

Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-20 Thread Minchan Kim
On Wed, Aug 20, 2014 at 03:38:27AM -0400, David Horner wrote: > On Wed, Aug 20, 2014 at 2:53 AM, Minchan Kim wrote: > > On Wed, Aug 20, 2014 at 02:26:50AM -0400, David Horner wrote: > >> On Tue, Aug 19, 2014 at 3:54 AM, Minchan Kim wrote: > >> > Normally, zram user could get maximum memory usage

Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-20 Thread David Horner
On Wed, Aug 20, 2014 at 2:53 AM, Minchan Kim wrote: > On Wed, Aug 20, 2014 at 02:26:50AM -0400, David Horner wrote: >> On Tue, Aug 19, 2014 at 3:54 AM, Minchan Kim wrote: >> > Normally, zram user could get maximum memory usage zram consumed >> > via polling mem_used_total with sysfs in userspace.

Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-19 Thread Minchan Kim
On Wed, Aug 20, 2014 at 02:26:50AM -0400, David Horner wrote: > On Tue, Aug 19, 2014 at 3:54 AM, Minchan Kim wrote: > > Normally, zram user could get maximum memory usage zram consumed > > via polling mem_used_total with sysfs in userspace. > > > > But it has a critical problem because user can mi

Re: [PATCH v2 4/4] zram: report maximum used memory

2014-08-19 Thread David Horner
On Tue, Aug 19, 2014 at 3:54 AM, Minchan Kim wrote: > Normally, zram user could get maximum memory usage zram consumed > via polling mem_used_total with sysfs in userspace. > > But it has a critical problem because user can miss peak memory > usage during update inverval of polling. For avoiding t