From: Ohad Ben-Cohen <ohad@wizery.com>
To: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: linux-omap@vger.kernel.org, h-kanigeri2@ti.com
Subject: Re: [PATCH 1/4] omap: mailbox cleanup: convert rwlocks to spinlock
Date: Wed, 28 Apr 2010 13:41:50 +0300 [thread overview]
Message-ID: <q2hda15981b1004280341l8fe596fu6a068086f10f61b2@mail.gmail.com> (raw)
In-Reply-To: <20100428.105036.39187012.Hiroshi.DOYU@nokia.com>
Hi Hiroshi,
On Wed, Apr 28, 2010 at 10:50 AM, Hiroshi DOYU <Hiroshi.DOYU@nokia.com> wrote:
> Hi Ohad,
>
> From: ext Ohad Ben-Cohen <ohad@wizery.com>
> Subject: [PATCH 1/4] omap: mailbox cleanup: convert rwlocks to spinlock
> Date: Tue, 27 Apr 2010 19:56:19 +0200
>
>> rwlocks are slower and have potential starvation issues so spinlocks are
>> generally preferred
>
> Would it be possible to explain the above a bit more?
Sure, sorry for the laconic description.
Jonathan Corbet wrote a nice summary about this:
http://lwn.net/Articles/364583/
We could switch to rcu, but it's really an overkill because we don't really
have a high bandwidth of readers (omap_mbox_get is not being called
so much).
The only disadvantage of a plain spinlock is that readers now will have
to wait in the line, but since omap_mbox_get isn't called so frequently,
I guess that by moving to spinlocks the average performance will actually
increase (since spinlocks are faster and most likely there will not be
multiple concurrent calls to omap_mbox_get).
Anyway I only consider this as a cleanup and not really a performance
issue, as mboxes_lock is not really on a hot path.
Thanks,
Ohad.
>
next prev parent reply other threads:[~2010-04-28 10:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 17:56 [PATCH 0/4] omap: mailbox: cleanup & simplify Ohad Ben-Cohen
2010-04-27 17:56 ` [PATCH 1/4] omap: mailbox cleanup: convert rwlocks to spinlock Ohad Ben-Cohen
2010-04-28 7:50 ` Hiroshi DOYU
2010-04-28 10:41 ` Ohad Ben-Cohen [this message]
2010-04-29 12:44 ` Kanigeri, Hari
2010-04-29 13:14 ` Ohad Ben-Cohen
2010-04-29 13:35 ` Ohad Ben-Cohen
2010-04-27 17:56 ` [PATCH 2/4] omap: mailbox cleanup: split MODULE_AUTHOR line Ohad Ben-Cohen
2010-04-27 17:56 ` [PATCH 3/4] omap: mailbox: fix reverse likeliness Ohad Ben-Cohen
2010-04-27 17:56 ` [PATCH 4/4] omap: mailbox: convert block api to kfifo Ohad Ben-Cohen
2010-04-28 5:52 ` Hiroshi DOYU
2010-04-28 11:02 ` Ohad Ben-Cohen
2010-04-28 11:16 ` Hiroshi DOYU
2010-04-28 11:25 ` Ohad Ben-Cohen
2010-04-28 11:52 ` Hiroshi DOYU
2010-04-28 12:03 ` Ohad Ben-Cohen
2010-04-28 5:56 ` Hiroshi DOYU
2010-04-28 11:02 ` Ohad Ben-Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=q2hda15981b1004280341l8fe596fu6a068086f10f61b2@mail.gmail.com \
--to=ohad@wizery.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=h-kanigeri2@ti.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).