kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Some doubts on MUTEX
@ 2011-02-22 23:00 subin gangadharan
  2011-02-22 23:20 ` Dave Hylands
  0 siblings, 1 reply; 5+ messages in thread
From: subin gangadharan @ 2011-02-22 23:00 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I am trying to understand how to use mutex API's properly,so while going
through the documentation,
there is section mentioning fast path and slow path for mutexes.

For your reference I am pasting this here.(kernel/mutex.c)
/*
 * We split the mutex lock/unlock logic into separate fastpath and
 * slowpath functions, to reduce the register pressure on the fastpath.
 * We also put the fastpath first in the kernel image, to make sure the
 * branch is predicted by the CPU as default-untaken.
 */
static __used noinline void __sched
__mutex_lock_slowpath(atomic_t *lock_count);


Can someone help me to understand what is the difference between fastpath
lock and slowpath lock?

Thanks in advance

Subin Gangadharan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110222/eaeaa211/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-23 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 23:00 Some doubts on MUTEX subin gangadharan
2011-02-22 23:20 ` Dave Hylands
2011-02-23  3:58   ` subin gangadharan
2011-02-23  8:04     ` Dave Hylands
2011-02-23 15:03       ` subin gangadharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).