From: Evgeniy Polyakov <zbr@ioremap.net>
To: NeilBrown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] w1: Introduce a slave mutex for serializing IO.
Date: Mon, 11 Jun 2012 00:58:55 +0400 [thread overview]
Message-ID: <20120610205855.GD4380@ioremap.net> (raw)
In-Reply-To: <20120518160507.63cddc24@notabene.brown>
Hi
Sorry for *that* long delay, this mail was somehow dropped.
On Fri, May 18, 2012 at 04:05:07PM +1000, NeilBrown (neilb@suse.de) wrote:
> So to avoid deadlocks between w1 slaves and sysfs, these must be
> two separate locks. Making them separate means that the work around
> in ds2780 and ds2781 can be removed.
>
> So this patch:
> - adds a new mutex: "bus_mutex" which serialises access to the bus.
> - takes mutex in w1_search and ds1wm_search while they access
> the bus for searching. The mutex is dropped before calling the
> callback which adds the slave.
> - changes all slaves to use bus_mutex instead of mutex to
> protect access to the bus
> - removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
> related code from drivers/power/ds278[01]_battery.c which
> calls them.
Greg, can you put it into the tree when merge window opens (sorry, I do
not really know release cycle dates). Since other drivers basically are
not affected (only mutex name changed for them), it should be ok, but
this new feature should be told for all new device.
Also if deadlock will be caught somewhere in w1 in current tree (which
is possible, although unlikely - w1 users are usually embedded devices
where new sysfs files are created only at startup time), we can direct
authors to this thread.
> Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
--
Evgeniy Polyakov
prev parent reply other threads:[~2012-06-10 20:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 2:49 [PATCH] w1: Introduce a slave mutex for serializing IO NeilBrown
2012-05-01 21:39 ` Evgeniy Polyakov
2012-05-02 6:26 ` NeilBrown
2012-05-03 17:58 ` Evgeniy Polyakov
2012-05-03 21:08 ` NeilBrown
2012-05-03 21:27 ` Evgeniy Polyakov
2012-05-09 1:43 ` NeilBrown
2012-05-15 1:26 ` Evgeniy Polyakov
2012-05-18 6:05 ` NeilBrown
2012-06-10 20:58 ` Evgeniy Polyakov [this message]
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=20120610205855.GD4380@ioremap.net \
--to=zbr@ioremap.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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