Re: [RFC][PATCH] cifs: convert cifs_tcp_ses_lock from a rwlock to a spinlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steve,

On 10/18/2010 11:59 PM, Jeff Layton wrote:
> On Mon, 18 Oct 2010 23:29:37 +0530
> Suresh Jayaraman <sjayaraman@xxxxxxx> wrote:
> 
>> cifs_tcp_ses_lock is a rwlock with protects the cifs_tcp_ses_list,
>> server->smb_ses_list and the ses->tcon_list. It also protects a few
>> ref counters in server, ses and tcon. In most cases the critical section
>> doesn't seem to be large, in a few cases where it is slightly large, there
>> seem to be really no benefit from concurrent access. I briefly considered RCU
>> mechanism but it appears to me that there is no real need.
>>
>> Replace it with a spinlock and get rid of the last rwlock in the cifs code.
>>
>> Signed-off-by: Suresh Jayaraman <sjayaraman@xxxxxxx>
>> ---
>>  fs/cifs/cifs_debug.c |   12 ++++----
>>  fs/cifs/cifsfs.c     |    8 +++---
>>  fs/cifs/cifsglob.h   |    2 +-
>>  fs/cifs/cifssmb.c    |    6 ++--
>>  fs/cifs/connect.c    |   70 +++++++++++++++++++++++++-------------------------
>>  fs/cifs/misc.c       |   14 +++++-----
>>  fs/cifs/sess.c       |    4 +-
>>  7 files changed, 58 insertions(+), 58 deletions(-)
>>

> 
> Looks reasonable. These codepaths aren't terribly "hot", so this lock
> is fairly low-contention anyway.
> 
> Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>

Can this and the subsequent comment fix patch can be queued for 2.6.37
(merge window seems open) if you don't see any issues?


Thanks,

-- 
Suresh Jayaraman
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux