All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: alan@lxorguk.ukuu.org.uk, lkml@rtr.ca, axboe@suse.de,
	forrest.zhao@intel.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/3] libata: implement hotplug by polling
Date: Mon, 24 Jul 2006 16:06:37 +0900	[thread overview]
Message-ID: <44C4717D.6080700@gmail.com> (raw)
In-Reply-To: <44BE9CBC.2000601@pobox.com>

Jeff Garzik wrote:
> NAK, there is no reason why a global poll list is needed.  Simply having 
> a struct workqueue in each schedule-able entity implicitly creates such 
> a list.  But regardless, this is another example of adding 
> cross-controller synchronization, where none is needed.
> 
> If the worker fired per-host_set, then you could use an ata_port dynamic 
> flag to indicate the poll-active ports, for the ata_hp_poll_worker() loop.
> 
> If the worker fires per-port, then no loop or mutex is needed at all. 
> You could simply call the hp_poll hook.

It was basically an optimization to reduce storage usage and spread all 
polling operations at least by polling interval even when there are many 
ports to poll.  Cross-port synchronization aside, it's very simple too. 
  Hmm... I don't think it makes much difference either way though.  I'll 
convert to per-port workqueue + timer.

>> @@ -633,6 +637,10 @@ struct ata_port_operations {
>>      void (*error_handler) (struct ata_port *ap);
>>      void (*post_internal_cmd) (struct ata_queued_cmd *qc);
>>  
>> +    void (*hp_poll_activate) (struct ata_port *ap);
>> +    void (*hp_poll_deactivate) (struct ata_port *ap);
>> +    int (*hp_poll) (struct ata_port *ap);
>> +
>>      irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
>>      void (*irq_clear) (struct ata_port *);
>>  
> 
> All new hooks require at least a one-two sentence description in the 
> DocBook docs, telling driver writers how to use them.

Will do.

-- 
tejun


  reply	other threads:[~2006-07-24  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17  7:00 [RFT][PATCHSET] hotplug polling, take 3 Tejun Heo
2006-07-17  7:00 ` [PATCH 1/3] libata: implement hotplug by polling Tejun Heo
2006-07-19 20:57   ` Jeff Garzik
2006-07-24  7:06     ` Tejun Heo [this message]
2006-07-17  7:00 ` [PATCH 2/3] libata: add hp-poll support to controllers with hotplug interrutps Tejun Heo
2006-07-17  7:00 ` [PATCH 3/3] libata: add hp-poll support to controllers without hotplug interrupts Tejun Heo
2006-07-19 20:57   ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-04-25  6:25 [PATCH 0/3] hotplug polling, respin Robin H. Johnson
2007-04-25  6:28 ` [PATCH 1/3] libata: implement hotplug by polling Robin H. Johnson
2006-10-15 22:37 [PATCHSET] hotplug polling, take 5 Tejun Heo
2006-10-15 22:37 ` [PATCH 1/3] libata: implement hotplug by polling Tejun Heo
2006-10-10  5:36 [PATCHSET] hotplug polling, take 4 Tejun Heo
2006-10-10  5:36 ` [PATCH 1/3] libata: implement hotplug by polling Tejun Heo
2006-07-05  6:06 [RFT][PATCHSET] hotplug polling, take 2 Tejun Heo
2006-07-05  6:06 ` [PATCH 1/3] libata: implement hotplug by polling Tejun Heo
2006-07-04 14:16 [RFT][PATCHSET] hotplug polling Tejun Heo
2006-07-04 14:16 ` [PATCH 1/3] libata: implement hotplug by polling Tejun Heo

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=44C4717D.6080700@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=axboe@suse.de \
    --cc=forrest.zhao@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /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.