Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-06-03 Thread Sergey Senozhatsky
On (05/30/14 16:34), Weijie Yang wrote: > Currently, we use a rwlock tb_lock to protect concurrent access to > the whole zram meta table. However, according to the actual access model, > there is only a small chance for upper user to access the same table[index], > so the current lock granularity i

Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-06-03 Thread Weijie Yang
On Tue, Jun 3, 2014 at 4:22 PM, Minchan Kim wrote: > Hello, > > On Tue, Jun 03, 2014 at 03:59:06PM +0800, Weijie Yang wrote: >> On Mon, Jun 2, 2014 at 8:43 AM, Minchan Kim wrote: >> > Hello Weijie, >> > >> > Thanks for resending. >> > Below are mostly nitpicks. >> > >> > On Fri, May 30, 2014 at 0

Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-06-03 Thread Minchan Kim
Hello, On Tue, Jun 03, 2014 at 03:59:06PM +0800, Weijie Yang wrote: > On Mon, Jun 2, 2014 at 8:43 AM, Minchan Kim wrote: > > Hello Weijie, > > > > Thanks for resending. > > Below are mostly nitpicks. > > > > On Fri, May 30, 2014 at 04:34:44PM +0800, Weijie Yang wrote: > >> Currently, we use a rwl

Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-06-03 Thread Weijie Yang
On Mon, Jun 2, 2014 at 8:43 AM, Minchan Kim wrote: > Hello Weijie, > > Thanks for resending. > Below are mostly nitpicks. > > On Fri, May 30, 2014 at 04:34:44PM +0800, Weijie Yang wrote: >> Currently, we use a rwlock tb_lock to protect concurrent access to >> the whole zram meta table. However, ac

Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-06-01 Thread Minchan Kim
Hello Weijie, Thanks for resending. Below are mostly nitpicks. On Fri, May 30, 2014 at 04:34:44PM +0800, Weijie Yang wrote: > Currently, we use a rwlock tb_lock to protect concurrent access to > the whole zram meta table. However, according to the actual access model, > there is only a small chan

Re: [PATCH v3] zram: remove global tb_lock with fine grain lock

2014-05-30 Thread Davidlohr Bueso
On Fri, 2014-05-30 at 16:34 +0800, Weijie Yang wrote: > Currently, we use a rwlock tb_lock to protect concurrent access to > the whole zram meta table. However, according to the actual access model, > there is only a small chance for upper user to access the same table[index], > so the current lock

[PATCH v3] zram: remove global tb_lock with fine grain lock

2014-05-30 Thread Weijie Yang
Currently, we use a rwlock tb_lock to protect concurrent access to the whole zram meta table. However, according to the actual access model, there is only a small chance for upper user to access the same table[index], so the current lock granularity is too big. The idea of optimization is to chang