kernel_optimize_test/drivers/ata
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
..
ahci.c [libata] Add support for AHCI controllers of MCP67. 2006-11-02 17:59:46 -05:00
ata_generic.c [libata] Don't use old-EH ->eng_timeout() hook when not needed 2006-09-27 05:41:13 -04:00
ata_piix.c Revert "[PATCH] Add 0x7110 piix to ata_piix.c" 2006-11-01 22:09:21 -05:00
Kconfig [PATCH] ATA must depend on BLOCK 2006-10-21 15:10:10 -04:00
libata-core.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
libata-eh.c WorkStruct: Separate delayable and non-delayable events. 2006-11-22 14:54:01 +00:00
libata-scsi.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
libata-sff.c [PATCH] libata-sff: Allow for wacky systems 2006-10-21 15:18:59 -04:00
libata.h WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
Makefile [libata] Delete pata_it8172 driver 2006-09-20 17:48:53 -04:00
pata_ali.c [PATCH] pata: teach ali about rev C8, keep pcmcia driver in sync 2006-10-04 08:15:15 -07:00
pata_amd.c [libata] Add support for PATA controllers of MCP67 to pata_amd.c. 2006-11-02 17:58:21 -05:00
pata_artop.c [PATCH] pata_artop: fix "& (1 >>" typo 2006-11-14 09:52:08 -05:00
pata_atiixp.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_cmd64x.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_cs5520.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_cs5530.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_cs5535.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_cypress.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_efar.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_hpt3x2n.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_hpt3x3.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_hpt37x.c [PATCH] hpt37x: Check the enablebits 2006-11-14 09:52:08 -05:00
pata_hpt366.c Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-10-04 08:06:16 -07:00
pata_isapnp.c [libata] Don't use old-EH ->eng_timeout() hook when not needed 2006-09-27 05:41:13 -04:00
pata_it821x.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_jmicron.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_legacy.c [libata] Don't use old-EH ->eng_timeout() hook when not needed 2006-09-27 05:41:13 -04:00
pata_mpiix.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_netcell.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_ns87410.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_oldpiix.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_opti.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_optidma.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_pcmcia.c [PATCH] pata: teach ali about rev C8, keep pcmcia driver in sync 2006-10-04 08:15:15 -07:00
pata_pdc202xx_old.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_pdc2027x.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_qdi.c [PATCH] pata-qdi: fix le32 in data_xfer 2006-10-11 04:48:52 -04:00
pata_radisys.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_rz1000.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_sc1200.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_serverworks.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_sil680.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_sis.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_sl82c105.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_triflex.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pata_via.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
pdc_adma.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sata_mv.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sata_nv.c [libata] sata_nv: Add PCI IDs 2006-11-01 05:23:11 -05:00
sata_promise.c Merge branch 'master' into upstream-fixes 2006-10-11 04:59:46 -04:00
sata_promise.h
sata_qstor.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sata_sil24.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sata_sil.c [PATCH] misc sata __iomem annotations 2006-10-10 15:37:21 -07:00
sata_sis.c [PATCH] sata_sis: fix flags handling for the secondary port 2006-10-31 20:26:10 -05:00
sata_svw.c [PATCH] misc sata __iomem annotations 2006-10-10 15:37:21 -07:00
sata_sx4.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sata_uli.c [libata] PCI ID table cleanup in various drivers 2006-09-28 20:21:59 -04:00
sata_via.c [libata] sata_via: fix obvious typo 2006-11-08 07:46:02 -05:00
sata_vsc.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00