From: Christoph Hellwig <hch@infradead.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>,
james.bottomley@suse.de, dave.jiang@intel.com,
linux-scsi@vger.kernel.org, jacek.danecki@intel.com,
ed.ciechanowski@intel.com, jeffrey.d.skirvin@intel.com,
edmund.nadolski@intel.com
Subject: Re: [RFC PATCH 4/6] isci: hardware / topology event handling
Date: Sun, 27 Mar 2011 18:28:54 -0400 [thread overview]
Message-ID: <20110327222854.GA7487@infradead.org> (raw)
In-Reply-To: <AANLkTimu_jM8wRuURNXrGmD1tJbXeVsJ7Qga9fLC7MJr@mail.gmail.com>
On Fri, Mar 25, 2011 at 03:34:39PM -0700, Dan Williams wrote:
> Ok, so that's why I went all the way to recommending a switch to
> delayed_workqueue. We can bring down the core and ensure all events
> have seen a cancellation. None of these containing objects are
> dynamically destroyed outside of driver exit, nor would they care
> about the switch from timer callback to process context. That final
> flush is the only elusive bit that is covered by flush_workqueue.
This seems like a really nasy hack to me. Right now there are 9
callers of isci_timer_create, of those
5 operate on struct scic_sds_controller
2 operate on struct scic_sds_phy
1 operates on struct scic_sds_port
1 operates on struct isci_request
of these at least the request has completely different life time rules
than the scic_sds_controller, so both the existing code and the
flush_workqueue variant would be incorrect.
I'd suggest that as a first step you remove the dynamic allocation of
the timers with a structure embedded into the containing structure
and replace isci_timer_list_destroy with a calls to
del_timer_sync when the containing structure is freed.
After that you can trivial remove the wrappers and just opencode the
Linux timer calls, which should lead to much simpler and easier to
understand code.
If the process context of delayed work items provices a significant
benefit to your execution model you can convert the timers to delayed
work items now, and remove the irqsafe locking. Given that the
isci code still does some non-trivial work from it's interrupt
handlers and tasklets I'm not sure it's going to buy you much, though.
It might be worth to try replacing the tasklets with threaded interrupts
to simplify the locking model, but it will need carefully benchmarking
to evaluate the performance impact.
next prev parent reply other threads:[~2011-03-27 22:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 0:34 [RFC PATCH 0/6] isci: initial driver release (part1: intro and lldd) Dan Williams
2011-02-07 0:34 ` [RFC PATCH 1/6] isci: initialization Dan Williams
2011-02-17 8:22 ` Jeff Garzik
2011-02-19 0:12 ` Dan Williams
2011-02-17 8:25 ` Christoph Hellwig
2011-02-19 0:23 ` Dan Williams
2011-03-04 23:35 ` James Bottomley
2011-03-08 1:51 ` Dan Williams
2011-03-18 16:51 ` Christoph Hellwig
2011-02-07 0:34 ` [RFC PATCH 2/6] isci: task (libsas interface support) Dan Williams
2011-02-09 15:01 ` David Milburn
2011-02-14 7:14 ` Dan Williams
2011-02-16 18:48 ` David Milburn
2011-02-16 19:35 ` David Milburn
2011-02-07 0:34 ` [RFC PATCH 3/6] isci: request (core request infrastructure) Dan Williams
2011-03-18 16:41 ` Christoph Hellwig
2011-02-07 0:34 ` [RFC PATCH 4/6] isci: hardware / topology event handling Dan Williams
2011-03-18 16:18 ` Christoph Hellwig
2011-03-23 8:15 ` Dan Williams
2011-03-23 8:40 ` Christoph Hellwig
2011-03-23 9:04 ` Dan Williams
2011-03-23 9:08 ` Christoph Hellwig
2011-03-24 0:07 ` Dan Williams
2011-03-24 6:26 ` Christoph Hellwig
2011-03-25 0:57 ` Dan Williams
2011-03-25 19:45 ` Christoph Hellwig
2011-03-25 21:39 ` Dan Williams
2011-03-25 22:07 ` Christoph Hellwig
2011-03-25 22:34 ` Dan Williams
2011-03-27 22:28 ` Christoph Hellwig [this message]
2011-03-29 1:11 ` Dan Williams
2011-03-30 0:37 ` Dan Williams
2011-02-07 0:35 ` [RFC PATCH 5/6] isci: phy, port, and remote device Dan Williams
2011-02-07 0:35 ` [RFC PATCH 6/6] isci: sata support and phy settings via request_firmware() Dan Williams
2011-02-07 7:58 ` [RFC PATCH 1/6] isci: initialization jack_wang
2011-02-14 7:49 ` Dan Williams
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=20110327222854.GA7487@infradead.org \
--to=hch@infradead.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=edmund.nadolski@intel.com \
--cc=jacek.danecki@intel.com \
--cc=james.bottomley@suse.de \
--cc=jeffrey.d.skirvin@intel.com \
--cc=linux-scsi@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).