Question about RCU

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

 



Hi,

I understand that multiple readers have to use rcu_read_lock(void) and rcu_read_unlock(void) to read data protected by rcu. However, I do not understand how the kernel distinguishes between multiple rcu protected regions. 

For e.g. if a region/data is protected by a mutex or spinlock, then the code is something like:

int data;
mutex_t/spinlock_t lock;

print_data()
{
acquire(lock);
release(lock);
}

Here kernel can distinguish between different regions/data using different locks used to protect it. However, the rcu_read(un)lock() do not accept any lock as a parameter.
How does it manage under the hood?

-Thanks.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux