Re: spin_lock() around sleepable function?

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

 



> Discussion thread is here:
>
>  http://www.gossamer-threads.com/lists/linux/kernel/892870?do=post_view_flat#892870
>
>  I am still replying his email.......trying to understand these....

Thnx Peter.

Ok. I think i got it now. get_cpu_var is to fetch the data (and
disable the local
preemption of the kernel) and spin_lock to protect the data. I don't get it why
some other cpu want to alter the content of some other cpu's variable, but it
could happen (not in that particular piece of code, but maybe somewhere
else in the kernel). Therefore you have to protect the data by some spin_lock.

Did i got it right?

Arvin

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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