From: Alison Schofield <amsfield22@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] Re: [PATCH 2/3] staging: wilc1000: host_interface: replace semaphores with mutexes
Date: Fri, 19 Feb 2016 11:42:44 -0800 [thread overview]
Message-ID: <20160219194243.GA8963@d830.WORKGROUP> (raw)
In-Reply-To: <4301281.rimkg3iJVl@wuerfel>
On Tue, Feb 16, 2016 at 10:34:11PM +0100, Arnd Bergmann wrote:
> On Tuesday 16 February 2016 10:16:07 Alison Schofield wrote:
> > On Tue, Feb 16, 2016 at 12:31:42AM -0800, Alison Schofield wrote:
> > > Replace semaphores with mutexes in the host_interface driver.
> > >
> > > This is a safe performance improvement because the usage model
> > > meets the principle of ownership for mutexes: the thread that
> > > locks is the same thread that unlocks.
> > >
> > > Signed-off-by: Alison Schofield <amsfield22@gmail.com>
> > > ---
> >
> > Arnd,
> > Thanks for the review and redirection. I will use it to learn more
> > about the usage of semas, mutexes, and the wait_for_completion too.
>
> You're welcome. Feel free to ask me on IRC if you need more help
> on this. I saw your question the other day, but you were gone when
> I tried to reply about the down_timeout().
>
> > Greg,
> > I hear you and will abandon this patch. It was no easy task figuring
> > out the purpose of these locks (just to comment them), so that should
> > have been a red flag that perhaps this wasn't the wisest choice for
> > my first attempt at lock changes. Learned some stuff and moving on...
>
> For this specific driver, I've done a number a number of patches myself
> and found that the maintainers at Atmel were rather responsive and
> able to test my patches on their systems.
>
> It might still be worthwhile to follow up doing one semaphore at a time,
> I'll gladly do an detailed review of those patches.
>
> There are also some easy unused semaphores in drivers/staging/rtl8712/
> and drivers/staging/rtl8723au that you can take care of.
>
> Arnd
A new patch follows that replaces one semaphore with a completion.
This particular semaphore is part of a subset in the host_if_drv
structure that are essentially being used to communicate completion
of messages sent to the host interface.
My intent here would be to get this one reviewed to verify I'm on the
right track. Next, I'll ask Atmel maintainers if they would be
willing/able to test such a set of patches. If yes, I'd create the
patchset, get it reviewed, and send to Atmel for test.
(A review and update of those global semaphores the host_interface could
follow.)
alisons
next prev parent reply other threads:[~2016-02-19 19:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 8:27 [PATCH 0/3] staging: wilc1000: semaphores to mutexes in host_interface Alison Schofield
2016-02-16 8:30 ` [PATCH 1/3] staging: wilc1000: host_interface: remove unused semaphores Alison Schofield
2016-02-16 8:33 ` [Outreachy kernel] " Arnd Bergmann
2016-02-19 6:45 ` Alison Schofield
2016-02-19 8:11 ` Arnd Bergmann
2016-02-16 8:31 ` [PATCH 2/3] staging: wilc1000: host_interface: replace semaphores with mutexes Alison Schofield
2016-02-16 8:46 ` [Outreachy kernel] " Arnd Bergmann
2016-02-16 17:36 ` Greg KH
2016-02-16 18:16 ` Alison Schofield
2016-02-16 21:34 ` [Outreachy kernel] " Arnd Bergmann
2016-02-19 19:42 ` Alison Schofield [this message]
2016-02-19 19:45 ` [PATCH] staging: wilc1000: replace semaphore get_inactive_time with a completion Alison Schofield
2016-02-19 21:03 ` [Outreachy kernel] " Arnd Bergmann
2016-02-20 0:54 ` Greg KH
2016-02-20 1:06 ` Alison Schofield
2016-02-20 1:13 ` Greg KH
2016-02-16 8:36 ` [PATCH 3/3] staging: wilc1000: host_interface: destroy mutexes at init/deinit Alison Schofield
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=20160219194243.GA8963@d830.WORKGROUP \
--to=amsfield22@gmail.com \
--cc=arnd@arndb.de \
--cc=outreachy-kernel@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.