linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [announce] 2.6.10-kj
@ 2004-12-25  0:48 Domen Puncer
  2005-01-07 19:33 ` [UPDATE PATCH] atm/ambassador: use msleep() instead of schedule_timeout() Nishanth Aravamudan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Domen Puncer @ 2004-12-25  0:48 UTC (permalink / raw)
  To: kj; +Cc: lkml

Hi.

Santa brought another present :-)

I'll start mailing new patches these days, and after external trees get
merged, I'll be bugging you with the old ones.


Patchset is at http://coderock.org/kj/2.6.10-kj/


new in this release:
--------------------
comment-drivers_block_floppy.c.patch
  From: james4765@verizon.net
  Subject: [KJ] [PATCH][RESEND] floppy: relocate devfs comment

module_param-drivers_net_3c59x.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch] net/3c59x: module_param conversions

schedule_cleanup-drivers_usb_class_usblp.c.patch
  From: Nishanth Aravamudan <nacc@us.ibm.com>
  Subject: [KJ] [PATCH] class/usblp: cleanup usblp_write()

typo-sound_isa_es18xx.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 8/8] ifdef typos: sound_isa_es18xx.c

typos-arch_ppc_platforms_prep_setup.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] Re: ifdef typos: arch_ppc_platforms_prep_setup.c -another one

typo-arch_ppc_syslib_ppc4xx_dma.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 2/8] ifdef typos: arch_ppc_syslib_ppc4xx_dma.c

typo-arch_sh_boards_renesas_hs7751rvoip_io.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 3/8] ifdef typos: 	arch_sh_boards_renesas_hs7751rvoip_io.c

typo-drivers_char_ipmi_ipmi_si_intf.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 4/8] ifdef typos: drivers_char_ipmi_ipmi_si_intf.c

typo-drivers_net_wireless_wavelan_cs.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 5/8] ifdef typos: drivers_net_wireless_wavelan_cs.c

typo-drivers_usb_net_usbnet.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 6/8] ifdef typos: drivers_usb_net_usbnet.c

typo-sound_isa_cs423x_cs4231_lib.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch 7/8] ifdef typos: sound_isa_cs423x_cs4231_lib.c

typo_au1000-arch_mips.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch] mips: AU1[0X]00_USB_DEVICE typo

typo-arch_ppc64_kernel_rtasd.c.patch
  From: Domen Puncer <domen@coderock.org>
  Subject: [KJ] [patch] ppc64: semicolon in rtasd.c

remove_file-arch_alpha_lib_dbg_stackcheck.S.patch
  delete unused file

remove_file-arch_alpha_lib_dbg_stackkill.S.patch
  delete unused file

remove_file-arch_alpha_lib_stacktrace.c.patch
  delete unused file

remove_file-arch_arm26_boot_compressed_hw_bse.c.patch
  delete unused file

remove_file-arch_m68k_apollo_dn_debug.c.patch
  delete unused file

remove_file-arch_m68k_sun3x_sun3x_ksyms.c.patch
  delete unused file

remove_file-arch_m68knommu_platform_68EZ328_ucsimm_crt0_himem.S.patch
  delete unused file

remove_file-arch_m68knommu_platform_68VZ328_ucdimm_crt0_himem.S.patch
  delete unused file

remove_file-arch_mips_arc_salone.c.patch
  delete unused file

remove_file-arch_mips_pmc_sierra_yosemite_ht_irq.c.patch
  delete unused file

remove_file-arch_ppc64_boot_no_initrd.c.patch
  delete unused file

remove_file-arch_ppc_kernel_find_name.c.patch
  delete unused file

remove_file-arch_ppc_syslib_ppc4xx_pm.c.patch
  delete unused file

remove_file-arch_ppc_syslib_ppc4xx_serial.c.patch
  delete unused file

remove_file-arch_sh64_lib_old_checksum.c.patch
  delete unused file

remove_file-arch_um_include_umn.h.patch
  delete unused file

remove_file-arch_x86_64_lib_old_checksum.c.patch
  delete unused file

remove_file-drivers_char_hp600_keyb.c.patch
  delete unused file

remove_file-drivers_char_rio_cdproto.h.patch
  delete unused file

remove_file-drivers_char_rsf16fmi.h.patch
  delete unused file

remove_file-drivers_net_gt64240eth.h.patch
  delete unused file

remove_file-drivers_parport_parport_arc.c.patch
  delete unused file

remove_file-drivers_pcmcia_au1000_generic.c.patch
  delete unused file

remove_file-drivers_pcmcia_au1000_pb1x00.c.patch
  delete unused file

remove_file-drivers_scsi_dpt_dpt_osdutil.h.patch
  delete unused file

remove_file-drivers_video_aty_xlinit.c.patch
  delete unused file

remove_file-drivers_video_riva_nv4ref.h.patch
  delete unused file

remove_file-fs_jffs2_histo.h.patch
  delete unused file

remove_file-fs_jfs_jfs_defragfs.h.patch
  delete unused file

remove_file-include_asm_alpha_numnodes.h.patch
  delete unused file

remove_file-include_asm_arm26_ian_char.h.patch
  delete unused file

remove_file-include_asm_arm_arch_epxa10db_mode_ctrl00.h.patch
  delete unused file

remove_file-include_asm_arm_arch_epxa10db_pld_conf00.h.patch
  delete unused file

remove_file-include_asm_arm_hardware_linkup_l1110.h.patch
  delete unused file

remove_file-include_asm_m68k_atari_SCCserial.h.patch
  delete unused file

remove_file-include_asm_m68knommu_io_hw_swap.h.patch
  delete unused file

remove_file-include_asm_m68knommu_semp3.h.patch
  delete unused file

remove_file-include_asm_mips_gfx.h.patch
  delete unused file

remove_file-include_asm_mips_it8172_it8172_lpc.h.patch
  delete unused file

remove_file-include_asm_mips_mach_au1x00_au1100_mmc.h.patch
  delete unused file

remove_file-include_asm_mips_mipsprom.h.patch
  delete unused file

remove_file-include_asm_mips_ng1.h.patch
  delete unused file

remove_file-include_asm_mips_ng1hw.h.patch
  delete unused file

remove_file-include_asm_mips_riscos_syscall.h.patch
  delete unused file

remove_file-include_asm_parisc_bootdata.h.patch
  delete unused file

remove_file-include_asm_ppc64_iSeries_iSeries_fixup.h.patch
  delete unused file

remove_file-include_asm_um_arch_signal_i386.h.patch
  delete unused file

remove_file-include_asm_um_archparam_i386.h.patch
  delete unused file

remove_file-include_asm_um_archparam_ppc.h.patch
  delete unused file

remove_file-include_asm_um_module_generic.h.patch
  delete unused file

remove_file-include_asm_um_module_i386.h.patch
  delete unused file

remove_file-include_asm_um_processor_i386.h.patch
  delete unused file

remove_file-include_asm_um_processor_ppc.h.patch
  delete unused file

remove_file-include_asm_um_ptrace_i386.h.patch
  delete unused file

remove_file-include_asm_um_sigcontext_i386.h.patch
  delete unused file

remove_file-include_asm_um_sigcontext_ppc.h.patch
  delete unused file

remove_file-include_asm_um_system_i386.h.patch
  delete unused file

remove_file-include_asm_um_system_ppc.h.patch
  delete unused file

remove_file-include_linux_byteorder_pdp_endian.h.patch
  delete unused file

remove_file-include_linux_netfilter_ipv4_ip_logging.h.patch
  delete unused file

remove_file-include_linux_netfilter_ipv6_ip6_logging.h.patch
  delete unused file

remove_file-include_linux_umsdos_fs_i.h.patch
  delete unused file

remove_file-include_sound_soundmem.h.patch
  delete unused file

remove_file-net_sunrpc_auth_gss_gss_pseudoflavors.c.patch
  delete unused file

remove_file-net_sunrpc_auth_gss_sunrpcgss_syms.c.patch
  delete unused file

remove_file-sound_core_seq_oss_seq_oss_misc.c.patch
  delete unused file

remove_file-sound_oss_maestro_tables.h.patch
  delete unused file

remove_file-sound_pci_cs46xx_imgs_cwcemb80.h.patch
  delete unused file

cleanup-drivers_media_radio_radio-sf16fmi.c.patch
  From: sebek64@post.cz (Marcel Sebek)
  Subject: [KJ] [PATCH] radio-sf16fmi cleanup

cleanup-drivers_media_radio_miropcm20-radio.c.patch
  From: sebek64@post.cz (Marcel Sebek)
  Subject: [KJ] [PATCH] miropcm20-radio cleanup

cleanup-drivers_atm_he.c.patch
  From: sebek64@post.cz (Marcel Sebek)
  Subject: [KJ] [PATCH] drivers/atm/he.c remove dead code

array_size-fs_proc_base.c.bak.patch
  From: walter harms <wharms@bfs.de>
  Subject: [KJ] inux-2.6.9/fs/proc/base.c: array size

remove_sprintf-fs_proc_proc_tty.c.bak.patch
  From: walter harms <wharms@bfs.de>
  Subject: [KJ] linux-2.6.9/fs/proc/proc_tty.c: avoid array

kj_tag.patch
  -kj



merged:
-------
min-max-arch_mips_au1000_common_usbdev
msleep-drivers_net_irda_pcmcia_yenta_socket
check-register_netdevice_notifier-net_8021q_vlan
check-register_netdevice_notifier-net_atm_mpc


changed:
--------
min-max-arch_sh_boards_bigsur_io.patch
  changed to min_t
ssleep-drivers_scsi_qla2xxx_qla_os
  changed to msleep
msleep_interruptible-drivers_macintosh_mediabay.patch
  fixed typo


dropped:
--------
remove-pci-find-device-arch_mips_pci_pci-hplj
  file removed
fix-test-kernel_sched
  nacked


all patches:
------------
remove-old-ifdefs-aic7xxx_osm_pci.patch
min-max-ide_ide-timing.h.patch
list-for-each-entry-drivers_chan_kern.patch
list-for-each-entry-drivers_macintosh_via-pmu.patch
list-for-each-entry-drivers_net_ppp_generic.patch
list-for-each-entry-fs_jffs_intrep.patch
list-for-each-entry-fs_namespace.patch
list-for-each-entry-safe-arch_i386_mm_pageattr.patch
list-for-each-entry-safe-fs_coda_psdev.patch
list-for-each-entry-safe-fs_dquot.patch
list-for-each-fs_dcache.patch
msleep-drivers_ide_ide-tape.patch
msleep-drivers_ieee1394_sbp2.patch
pr_debug-drivers_block_umem.patch
list-for-each-drivers_net_ipv6_ip6_fib.patch
list-for-each-drivers_net_tulip_de4x5.patch
min-max-arch_sh_boards_bigsur_io.patch
min-max-arch_sh_cchips_hd6446x_hd64465_io.patch
msleep-drivers_atm_ambassador.patch
msleep-drivers_block_xd.patch
msleep-drivers_ide_ide-cd.patch
msleep-drivers_ide_ide-cs.patch
msleep-drivers_mtd_chips_amd_flash.patch
msleep-drivers_mtd_chips_cfi_cmdset_0001.patch
msleep-drivers_mtd_chips_cfi_cmdset_0002.patch
msleep-drivers_mtd_chips_cfi_cmdset_0020.patch
msleep_interruptible-drivers_base_dmapool.patch
msleep_interruptible-drivers_block_cciss.patch
msleep_interruptible-drivers_block_pcd.patch
msleep_interruptible-drivers_block_pf.patch
msleep_interruptible-drivers_block_pg.patch
msleep_interruptible-drivers_block_pt.patch
msleep_interruptible-drivers_cdrom_sonycd535.patch
msleep_interruptible-drivers_macintosh_mediabay.patch
set_current_state-drivers_block_swim3.patch
set_current_state-drivers_block_swim_iop.patch
add_module_version-drivers_net_8139cp.patch
for-each-pci-dev-arch_i386_pci_acpi.patch
for-each-pci-dev-arch_i386_pci_i386.patch
for-each-pci-dev-drivers_char_agp_generic.patch
for-each-pci-dev-drivers_char_agp_isoch.patch
function-string-arch-mips.patch
msleep-drivers_media_radio_radio-zoltrix.patch
msleep-drivers_net_3c505.patch
msleep-drivers_net_e1000_e1000_osdep.patch
msleep-drivers_net_irda_act200l-sir.patch
msleep-drivers_net_irda_irtty-sir.patch
msleep-drivers_net_irda_ma600-sir.patch
msleep-drivers_net_irda_pcmcia_xirc2ps_cs.patch
msleep-drivers_net_irda_sir_dev.patch
msleep-drivers_net_ixgb_ixgb_osdep.patch
msleep-drivers_net_ni65.patch
msleep-drivers_net_ns83820.patch
msleep-drivers_net_s2io.patch
msleep-drivers_net_wan_cosa.patch
msleep-drivers_net_wireless_prism54_islpci_dev.patch
msleep-drivers_scsi_ibmvscsi.patch
msleep-drivers_scsi_ide-scsi.patch
msleep-drivers_scsi_imm.patch
msleep-drivers_scsi_osst.patch
msleep-drivers_scsi_ppa.patch
msleep-drivers_scsi_qla1280.patch
msleep_interruptible-drivers_net_cs89x0.patch
msleep_interruptible-drivers_net_e1000_e1000_ethtool.patch
msleep_interruptible-drivers_net_gt96100eth.patch
msleep_interruptible-drivers_net_irda_tekram-sir.patch
msleep_interruptible-drivers_net_ixgb_ixgb_ethtool.patch
msleep_interruptible-drivers_net_pcnet32.patch
msleep_interruptible-drivers_net_sb1000.patch
msleep_interruptible-drivers_net_slip.patch
msleep_interruptible-drivers_net_wan_cycx_drv.patch
msleep_interruptible-drivers_parport_ieee1284_ops.patch
msleep_interruptible-drivers_parport_ieee1284.patch
msleep_interruptible-drivers_parport_parport_pc.patch
msleep_interruptible-drivers_s390_net_ctctty.patch
msleep_interruptible-drivers_sbus_char_aurora.patch
msleep_interruptible-drivers_sbus_char_envctrl.patch
msleep_interruptible-drivers_scsi_dpt_i2o.patch
msleep_interruptible-drivers_scsi_st.patch
msleep_interruptible-drivers_tc_zs.patch
msleep+msleep_interruptible-drivers_net_e100.patch
msleep+msleep_interruptible-drivers_net_tokenring_ibmtr.patch
msleep+msleep_interruptible-drivers_net_wireless_airo.patch
msleep+ssleep-drivers_net_appletalk_ltpc.patch
pci_dev_present-arch_ia64_hp_common_sba_iommu.patch
pci_dev_present-arch_ia64_pci_pci.patch
pci_dev_present-drivers_ide_pci_alim15x3.patch
pci_get_device-drivers_char_agp_amd64-agp.patch
pci_get_device-drivers_char_agp_intel-agp.patch
pci_get_device-drivers_char_agp_intel-mch-agp.patch
remove-pci-find-device-arch_sparc64_kernel_ebus.patch
remove-pci-find-device-drivers_net_e1000_e1000_main.patch
remove-pci-find-device-drivers_net_gt96100eth.patch
remove-pci-find-device-drivers_net_ixgb_ixgb_main.patch
remove-pci-find-device-drivers_net_tg3.patch
set_current_state-drivers_net_irda_stir4200.patch
set_current_state-drivers_net_tokenring_tms380tr.patch
set_current_state-drivers_net_wan_farsync.patch
ssleep-drivers_net_wireless_orinoco_plx.patch
ssleep-drivers_net_wireless_orinoco_tmd.patch
ssleep+msleep_interruptible-drivers_net_tokenring_lanstreamer.patch
fix-comment-fs_jbd_journal.patch
lib-parser-fs_devpts_inode.patch
msleep_interruptible-drivers_cdrom_sonycd535_2.patch
msleep_interruptible-drivers_message_fusion_mptbase.patch
msleep_interruptible-drivers_net_ewrk3.patch
reorder-state-drivers_char_snsc.patch
reorder-state-drivers_video_pxafb.patch
reorder-state-drivers_video_sa1100fb.patch
set_current_state-drivers_input_joystick_iforce_iforce-packets.patch
ssleep-drivers_scsi_qla2xxx_qla_os.patch
docs-fs_super.patch
docs-kernel_sysctl.patch
kconfig-arch_sh_drivers_pci.patch
kconfig-arch_sparc64.patch
module_parm-net_ne2k-pci.patch
module_parm-net_wireless_atmel_cs.patch
module_parm-net_wireless_orinoco.patch
module_parm-net_wireless_wavelan.p.h.patch
module_parm-net_wireless_wl3501_cs.patch
msleep-sound_sparc_cs4231.patch
myri_code_cleanup.patch
printk-drivers-scsi-zalon.patch
strlcpy-net_wireless_wavelan.patch
comment-drivers_block_floppy.c.patch
module_param-drivers_net_3c59x.c.patch
schedule_cleanup-drivers_usb_class_usblp.c.patch
typo-sound_isa_es18xx.c.patch
typos-arch_ppc_platforms_prep_setup.c.patch
typo-arch_ppc_syslib_ppc4xx_dma.c.patch
typo-arch_sh_boards_renesas_hs7751rvoip_io.c.patch
typo-drivers_char_ipmi_ipmi_si_intf.c.patch
typo-drivers_net_wireless_wavelan_cs.c.patch
typo-drivers_usb_net_usbnet.c.patch
typo-sound_isa_cs423x_cs4231_lib.c.patch
typo_au1000-arch_mips.patch
typo-arch_ppc64_kernel_rtasd.c.patch
remove_file-arch_alpha_lib_dbg_stackcheck.S.patch
remove_file-arch_alpha_lib_dbg_stackkill.S.patch
remove_file-arch_alpha_lib_stacktrace.c.patch
remove_file-arch_arm26_boot_compressed_hw_bse.c.patch
remove_file-arch_m68k_apollo_dn_debug.c.patch
remove_file-arch_m68k_sun3x_sun3x_ksyms.c.patch
remove_file-arch_m68knommu_platform_68EZ328_ucsimm_crt0_himem.S.patch
remove_file-arch_m68knommu_platform_68VZ328_ucdimm_crt0_himem.S.patch
remove_file-arch_mips_arc_salone.c.patch
remove_file-arch_mips_pmc_sierra_yosemite_ht_irq.c.patch
remove_file-arch_ppc64_boot_no_initrd.c.patch
remove_file-arch_ppc_kernel_find_name.c.patch
remove_file-arch_ppc_syslib_ppc4xx_pm.c.patch
remove_file-arch_ppc_syslib_ppc4xx_serial.c.patch
remove_file-arch_sh64_lib_old_checksum.c.patch
remove_file-arch_um_include_umn.h.patch
remove_file-arch_x86_64_lib_old_checksum.c.patch
remove_file-drivers_char_hp600_keyb.c.patch
remove_file-drivers_char_rio_cdproto.h.patch
remove_file-drivers_char_rsf16fmi.h.patch
remove_file-drivers_net_gt64240eth.h.patch
remove_file-drivers_parport_parport_arc.c.patch
remove_file-drivers_pcmcia_au1000_generic.c.patch
remove_file-drivers_pcmcia_au1000_pb1x00.c.patch
remove_file-drivers_scsi_dpt_dpt_osdutil.h.patch
remove_file-drivers_video_aty_xlinit.c.patch
remove_file-drivers_video_riva_nv4ref.h.patch
remove_file-fs_jffs2_histo.h.patch
remove_file-fs_jfs_jfs_defragfs.h.patch
remove_file-include_asm_alpha_numnodes.h.patch
remove_file-include_asm_arm26_ian_char.h.patch
remove_file-include_asm_arm_arch_epxa10db_mode_ctrl00.h.patch
remove_file-include_asm_arm_arch_epxa10db_pld_conf00.h.patch
remove_file-include_asm_arm_hardware_linkup_l1110.h.patch
remove_file-include_asm_m68k_atari_SCCserial.h.patch
remove_file-include_asm_m68knommu_io_hw_swap.h.patch
remove_file-include_asm_m68knommu_semp3.h.patch
remove_file-include_asm_mips_gfx.h.patch
remove_file-include_asm_mips_it8172_it8172_lpc.h.patch
remove_file-include_asm_mips_mach_au1x00_au1100_mmc.h.patch
remove_file-include_asm_mips_mipsprom.h.patch
remove_file-include_asm_mips_ng1.h.patch
remove_file-include_asm_mips_ng1hw.h.patch
remove_file-include_asm_mips_riscos_syscall.h.patch
remove_file-include_asm_parisc_bootdata.h.patch
remove_file-include_asm_ppc64_iSeries_iSeries_fixup.h.patch
remove_file-include_asm_um_arch_signal_i386.h.patch
remove_file-include_asm_um_archparam_i386.h.patch
remove_file-include_asm_um_archparam_ppc.h.patch
remove_file-include_asm_um_module_generic.h.patch
remove_file-include_asm_um_module_i386.h.patch
remove_file-include_asm_um_processor_i386.h.patch
remove_file-include_asm_um_processor_ppc.h.patch
remove_file-include_asm_um_ptrace_i386.h.patch
remove_file-include_asm_um_sigcontext_i386.h.patch
remove_file-include_asm_um_sigcontext_ppc.h.patch
remove_file-include_asm_um_system_i386.h.patch
remove_file-include_asm_um_system_ppc.h.patch
remove_file-include_linux_byteorder_pdp_endian.h.patch
remove_file-include_linux_netfilter_ipv4_ip_logging.h.patch
remove_file-include_linux_netfilter_ipv6_ip6_logging.h.patch
remove_file-include_linux_umsdos_fs_i.h.patch
remove_file-include_sound_soundmem.h.patch
remove_file-net_sunrpc_auth_gss_gss_pseudoflavors.c.patch
remove_file-net_sunrpc_auth_gss_sunrpcgss_syms.c.patch
remove_file-sound_core_seq_oss_seq_oss_misc.c.patch
remove_file-sound_oss_maestro_tables.h.patch
remove_file-sound_pci_cs46xx_imgs_cwcemb80.h.patch
cleanup-drivers_media_radio_radio-sf16fmi.c.patch
cleanup-drivers_media_radio_miropcm20-radio.c.patch
cleanup-drivers_atm_he.c.patch
array_size-fs_proc_base.c.bak.patch
remove_sprintf-fs_proc_proc_tty.c.bak.patch
kj_tag.patch

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [UPDATE PATCH] atm/ambassador: use msleep() instead of schedule_timeout()
  2004-12-25  0:48 [announce] 2.6.10-kj Domen Puncer
@ 2005-01-07 19:33 ` Nishanth Aravamudan
  2005-01-07 19:40 ` [UPDATE PATCH] ide/ide-cd: use ssleep() " Nishanth Aravamudan
  2005-01-07 21:34 ` [UPDATE PATCH] ieee1394/sbp2: " Nishanth Aravamudan
  2 siblings, 0 replies; 11+ messages in thread
From: Nishanth Aravamudan @ 2005-01-07 19:33 UTC (permalink / raw)
  To: kj, lkml; +Cc: chas, linux-atm-general

On Sat, Dec 25, 2004 at 01:48:46AM +0100, Domen Puncer wrote:
> Hi.
> 
> Santa brought another present :-)
> 
> I'll start mailing new patches these days, and after external trees get
> merged, I'll be bugging you with the old ones.

<snip>

> all patches:
> ------------

<snip>

> msleep-drivers_atm_ambassador.patch

Please consider updating to the following patch.

Description: Multiple schedule_timeout() related fixes. Generally uses msleep()
to guarantee the task delays as expected. In one place, this allowed for the
deletion of a variable. In a few places, I reverted back to using
TASK_INTERRUPTIBLE, because the code makes little sense otherwise. In these
places, the units of the timeout variable has been changed from jiffies to
msecs. As far as I can see, this driver is still not fixed, as there is no
response to the signal which may have interrupted the sleep. But this patch
at least brings it closer.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.10-v/drivers/atm/ambassador.c	2004-12-24 13:33:59.000000000 -0800
+++ 2.6.10/drivers/atm/ambassador.c	2005-01-04 14:57:49.000000000 -0800
@@ -574,7 +574,6 @@ static int command_do (amb_dev * dev, co
   amb_cq * cq = &dev->cq;
   volatile amb_cq_ptrs * ptrs = &cq->ptrs;
   command * my_slot;
-  unsigned long timeout;
   
   PRINTD (DBG_FLOW|DBG_CMD, "command_do %p", dev);
   
@@ -599,20 +598,14 @@ static int command_do (amb_dev * dev, co
     // mail the command
     wr_mem (dev, offsetof(amb_mem, mb.adapter.cmd_address), virt_to_bus (ptrs->in));
     
-    // prepare to wait for cq->pending milliseconds
-    // effectively one centisecond on i386
-    timeout = (cq->pending*HZ+999)/1000;
-    
     if (cq->pending > cq->high)
       cq->high = cq->pending;
     spin_unlock (&cq->lock);
     
-    while (timeout) {
-      // go to sleep
-      // PRINTD (DBG_CMD, "wait: sleeping %lu for command", timeout);
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
-    }
+    // these comments were in a while-loop before, msleep removes the loop
+    // go to sleep
+    // PRINTD (DBG_CMD, "wait: sleeping %lu for command", timeout);
+    msleep(cq->pending);
     
     // wait for my slot to be reached (all waiters are here or above, until...)
     while (ptrs->out != my_slot) {
@@ -1799,12 +1792,11 @@ static int __init do_loader_command (vol
   // dump_loader_block (lb);
   wr_mem (dev, offsetof(amb_mem, doorbell), virt_to_bus (lb) & ~onegigmask);
   
-  timeout = command_timeouts[cmd] * HZ/100;
+  timeout = command_timeouts[cmd] * 10;
   
   while (!lb->result || lb->result == cpu_to_be32 (COMMAND_IN_PROGRESS))
     if (timeout) {
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
+      timeout = msleep_interruptible(timeout);
     } else {
       PRINTD (DBG_LOAD|DBG_ERR, "command %d timed out", cmd);
       dump_registers (dev);
@@ -1814,10 +1806,10 @@ static int __init do_loader_command (vol
   
   if (cmd == adapter_start) {
     // wait for start command to acknowledge...
-    timeout = HZ/10;
+    timeout = 100;
     while (rd_plain (dev, offsetof(amb_mem, doorbell)))
       if (timeout) {
-	timeout = schedule_timeout (timeout);
+	timeout = msleep_interruptible(timeout);
       } else {
 	PRINTD (DBG_LOAD|DBG_ERR, "start command did not clear doorbell, res=%08x",
 		be32_to_cpu (lb->result));
@@ -1932,17 +1924,12 @@ static int amb_reset (amb_dev * dev, int
   if (diags) { 
     unsigned long timeout;
     // 4.2 second wait
-    timeout = HZ*42/10;
-    while (timeout) {
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
-    }
+    msleep(4200);
     // half second time-out
-    timeout = HZ/2;
+    timeout = 500;
     while (!rd_plain (dev, offsetof(amb_mem, mb.loader.ready)))
       if (timeout) {
-        set_current_state(TASK_UNINTERRUPTIBLE);
-	timeout = schedule_timeout (timeout);
+        timeout = msleep_interruptible(timeout);
       } else {
 	PRINTD (DBG_LOAD|DBG_ERR, "reset timed out");
 	return -ETIMEDOUT;
@@ -2056,14 +2043,12 @@ static int __init amb_talk (amb_dev * de
   wr_mem (dev, offsetof(amb_mem, doorbell), virt_to_bus (&a));
   
   // 2.2 second wait (must not touch doorbell during 2 second DMA test)
-  timeout = HZ*22/10;
-  while (timeout)
-    timeout = schedule_timeout (timeout);
+  msleep(2200);
   // give the adapter another half second?
-  timeout = HZ/2;
+  timeout = 500;
   while (rd_plain (dev, offsetof(amb_mem, doorbell)))
     if (timeout) {
-      timeout = schedule_timeout (timeout);
+      timeout = msleep_interruptible(timeout);
     } else {
       PRINTD (DBG_INIT|DBG_ERR, "adapter init timed out");
       return -ETIMEDOUT;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [UPDATE PATCH] ide/ide-cd: use ssleep() instead of schedule_timeout()
  2004-12-25  0:48 [announce] 2.6.10-kj Domen Puncer
  2005-01-07 19:33 ` [UPDATE PATCH] atm/ambassador: use msleep() instead of schedule_timeout() Nishanth Aravamudan
@ 2005-01-07 19:40 ` Nishanth Aravamudan
  2005-01-07 19:47   ` Jens Axboe
  2005-01-07 21:34 ` [UPDATE PATCH] ieee1394/sbp2: " Nishanth Aravamudan
  2 siblings, 1 reply; 11+ messages in thread
From: Nishanth Aravamudan @ 2005-01-07 19:40 UTC (permalink / raw)
  To: kj, lkml; +Cc: axboe

On Sat, Dec 25, 2004 at 01:48:46AM +0100, Domen Puncer wrote:
> Hi.
> 
> Santa brought another present :-)
> 
> I'll start mailing new patches these days, and after external trees get
> merged, I'll be bugging you with the old ones.
> 
> 
> Patchset is at http://coderock.org/kj/2.6.10-kj/

<snip>

> msleep-drivers_ide_ide-cd.patch

Please consider updating to the following patch:

Description: Uses ssleep() in place of cdrom_sleep() to guarantee the task
delays as expected. Remove cdrom_sleep() definition, as this is the only place
where it is called.

Signed-off-by: Nishanth Aravamudan


--- 2.6.10-v/drivers/ide/ide-cd.c	2004-12-24 13:34:33.000000000 -0800
+++ 2.6.10/drivers/ide/ide-cd.c	2005-01-05 14:23:05.000000000 -0800
@@ -1520,19 +1520,6 @@ static ide_startstop_t cdrom_do_packet_c
 }
 
 
-/* Sleep for TIME jiffies.
-   Not to be called from an interrupt handler. */
-static
-void cdrom_sleep (int time)
-{
-	int sleep = time;
-
-	do {
-		set_current_state(TASK_INTERRUPTIBLE);
-		sleep = schedule_timeout(sleep);
-	} while (sleep);
-}
-
 static
 int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
 {
@@ -1567,7 +1554,7 @@ int cdrom_queue_packet_command(ide_drive
 				/* The drive is in the process of loading
 				   a disk.  Retry, but wait a little to give
 				   the drive time to complete the load. */
-				cdrom_sleep(2 * HZ);
+				ssleep(2);
 			} else {
 				/* Otherwise, don't retry. */
 				retries = 0;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ide/ide-cd: use ssleep() instead of schedule_timeout()
  2005-01-07 19:40 ` [UPDATE PATCH] ide/ide-cd: use ssleep() " Nishanth Aravamudan
@ 2005-01-07 19:47   ` Jens Axboe
  2005-01-15  0:58     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Axboe @ 2005-01-07 19:47 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: kj, lkml

On Fri, Jan 07 2005, Nishanth Aravamudan wrote:
> On Sat, Dec 25, 2004 at 01:48:46AM +0100, Domen Puncer wrote:
> > Hi.
> > 
> > Santa brought another present :-)
> > 
> > I'll start mailing new patches these days, and after external trees get
> > merged, I'll be bugging you with the old ones.
> > 
> > 
> > Patchset is at http://coderock.org/kj/2.6.10-kj/
> 
> <snip>
> 
> > msleep-drivers_ide_ide-cd.patch
> 
> Please consider updating to the following patch:
> 
> Description: Uses ssleep() in place of cdrom_sleep() to guarantee the task
> delays as expected. Remove cdrom_sleep() definition, as this is the only place
> where it is called.
> 
> Signed-off-by: Nishanth Aravamudan

Looks fine.

Acked-by: Jens Axboe <axboe@suse.de>

> --- 2.6.10-v/drivers/ide/ide-cd.c	2004-12-24 13:34:33.000000000 -0800
> +++ 2.6.10/drivers/ide/ide-cd.c	2005-01-05 14:23:05.000000000 -0800
> @@ -1520,19 +1520,6 @@ static ide_startstop_t cdrom_do_packet_c
>  }
>  
>  
> -/* Sleep for TIME jiffies.
> -   Not to be called from an interrupt handler. */
> -static
> -void cdrom_sleep (int time)
> -{
> -	int sleep = time;
> -
> -	do {
> -		set_current_state(TASK_INTERRUPTIBLE);
> -		sleep = schedule_timeout(sleep);
> -	} while (sleep);
> -}
> -
>  static
>  int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
>  {
> @@ -1567,7 +1554,7 @@ int cdrom_queue_packet_command(ide_drive
>  				/* The drive is in the process of loading
>  				   a disk.  Retry, but wait a little to give
>  				   the drive time to complete the load. */
> -				cdrom_sleep(2 * HZ);
> +				ssleep(2);
>  			} else {
>  				/* Otherwise, don't retry. */
>  				retries = 0;
> 

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2004-12-25  0:48 [announce] 2.6.10-kj Domen Puncer
  2005-01-07 19:33 ` [UPDATE PATCH] atm/ambassador: use msleep() instead of schedule_timeout() Nishanth Aravamudan
  2005-01-07 19:40 ` [UPDATE PATCH] ide/ide-cd: use ssleep() " Nishanth Aravamudan
@ 2005-01-07 21:34 ` Nishanth Aravamudan
  2005-01-09  9:01   ` Stefan Richter
  2 siblings, 1 reply; 11+ messages in thread
From: Nishanth Aravamudan @ 2005-01-07 21:34 UTC (permalink / raw)
  To: kj, lkml; +Cc: bcollins, linux1394-devel

On Sat, Dec 25, 2004 at 01:48:46AM +0100, Domen Puncer wrote:
> Hi.
> 
> Santa brought another present :-)
> 
> I'll start mailing new patches these days, and after external trees get
> merged, I'll be bugging you with the old ones.
> 
> 
> Patchset is at http://coderock.org/kj/2.6.10-kj/

<snip>

> all patches:
> ------------

<snip>

> msleep-drivers_ieee1394_sbp2.patch

Please consider updating to the following patch:

Description: Use ssleep() instead of schedule_timeout() to guarantee the task
delays as expected. The existing code should not really need to run in
TASK_INTERRUPTIBLE, as there is no check for signals (or even an early return
value whatsoever). ssleep() takes care of these issues.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.10-v/drivers/ieee1394/sbp2.c	2004-12-24 13:34:00.000000000 -0800
+++ 2.6.10/drivers/ieee1394/sbp2.c	2005-01-05 14:23:05.000000000 -0800
@@ -902,8 +902,7 @@ alloc_fail:
 	 * connected to the sbp2 device being removed. That host would
 	 * have a certain amount of time to relogin before the sbp2 device
 	 * allows someone else to login instead. One second makes sense. */
-	set_current_state(TASK_INTERRUPTIBLE);
-	schedule_timeout(HZ);
+	ssleep(1);
 
 	/*
 	 * Login to the sbp-2 device

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2005-01-07 21:34 ` [UPDATE PATCH] ieee1394/sbp2: " Nishanth Aravamudan
@ 2005-01-09  9:01   ` Stefan Richter
  2005-01-10 17:39     ` Nishanth Aravamudan
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Richter @ 2005-01-09  9:01 UTC (permalink / raw)
  To: linux1394-devel; +Cc: kj, lkml, bcollins, Nishanth Aravamudan

Nishanth Aravamudan wrote:
> Description: Use ssleep() instead of schedule_timeout() to guarantee 
> the task
> delays as expected. The existing code should not really need to run in
> TASK_INTERRUPTIBLE, as there is no check for signals (or even an 
> early return
> value whatsoever). ssleep() takes care of these issues.

> --- 2.6.10-v/drivers/ieee1394/sbp2.c	2004-12-24 13:34:00.000000000 
> -0800
> +++ 2.6.10/drivers/ieee1394/sbp2.c	2005-01-05 14:23:05.000000000 -0800
> @@ -902,8 +902,7 @@ alloc_fail:
> 	 * connected to the sbp2 device being removed. That host would
> 	 * have a certain amount of time to relogin before the sbp2 device
> 	 * allows someone else to login instead. One second makes sense. */
> -	set_current_state(TASK_INTERRUPTIBLE);
> -	schedule_timeout(HZ);
> +	ssleep(1);

Maybe the current code is _deliberately_ accepting interruption by 
signals but trying to complete sbp2_probe() anyway. However it seems 
more plausible to me to abort the device probe, for example like this:
if (msleep_interruptible(1000)) {
	sbp2_remove_device(scsi_id);
	return -EINTR;
}
Anyway, signal handling does not appear to be critical there.
-- 
Stefan Richter
-=====-=-=-= ---= -=--=
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2005-01-09  9:01   ` Stefan Richter
@ 2005-01-10 17:39     ` Nishanth Aravamudan
  2005-01-14  4:52       ` Dan Dennedy
  0 siblings, 1 reply; 11+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 17:39 UTC (permalink / raw)
  To: Stefan Richter; +Cc: linux1394-devel, kj, lkml, bcollins

On Sun, Jan 09, 2005 at 10:01:21AM +0100, Stefan Richter wrote:
> Nishanth Aravamudan wrote:
> >Description: Use ssleep() instead of schedule_timeout() to guarantee 
> >the task
> >delays as expected. The existing code should not really need to run in
> >TASK_INTERRUPTIBLE, as there is no check for signals (or even an 
> >early return
> >value whatsoever). ssleep() takes care of these issues.
> 
> >--- 2.6.10-v/drivers/ieee1394/sbp2.c	2004-12-24 13:34:00.000000000 
> >-0800
> >+++ 2.6.10/drivers/ieee1394/sbp2.c	2005-01-05 14:23:05.000000000 -0800
> >@@ -902,8 +902,7 @@ alloc_fail:
> >	 * connected to the sbp2 device being removed. That host would
> >	 * have a certain amount of time to relogin before the sbp2 device
> >	 * allows someone else to login instead. One second makes sense. */
> >-	set_current_state(TASK_INTERRUPTIBLE);
> >-	schedule_timeout(HZ);
> >+	ssleep(1);
> 
> Maybe the current code is _deliberately_ accepting interruption by 
> signals but trying to complete sbp2_probe() anyway. However it seems 
> more plausible to me to abort the device probe, for example like this:
> if (msleep_interruptible(1000)) {
> 	sbp2_remove_device(scsi_id);
> 	return -EINTR;
> }

You might be right, but I'd like to get Ben's input on this, as I honeslty am
unsure. To be fair, I am trying to audit all usage of schedule_timeout() and the
semantic interpretation (to me) of using TASK_INTERRUPTIBLE is that you wish to
sleep a certain amount of time, but also are prepared for an early return on
either signals or wait-queue events. msleep_interruptible() cleanly removes this
second issue, but still requires the caller to respond appropriately if there is
a return value. Hence, I like your change. I think it makes the most sense.
Since I didn't/don't know how the device works, I was not able to make the
change myself. Thanks for your input!

> Anyway, signal handling does not appear to be critical there.

Just out of curiousity, doesn't that run the risk, though, of
signal_pending(current) being true for quite a bit of time following the
timeout?

Thanks,
Nish

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2005-01-10 17:39     ` Nishanth Aravamudan
@ 2005-01-14  4:52       ` Dan Dennedy
  2005-01-14 11:16         ` Stefan Richter
  2005-01-19  6:27         ` [KJ] " Nish Aravamudan
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Dennedy @ 2005-01-14  4:52 UTC (permalink / raw)
  To: Nishanth Aravamudan
  Cc: Stefan Richter, Linux1394-Devel, kj, lkml, Ben Collins

On Mon, 2005-01-10 at 09:39 -0800, Nishanth Aravamudan wrote:
> On Sun, Jan 09, 2005 at 10:01:21AM +0100, Stefan Richter wrote:
> > Nishanth Aravamudan wrote:
> > >Description: Use ssleep() instead of schedule_timeout() to guarantee 
> > >the task
> > >delays as expected. The existing code should not really need to run in
> > >TASK_INTERRUPTIBLE, as there is no check for signals (or even an 
> > >early return
> > >value whatsoever). ssleep() takes care of these issues.
> > 
> > >--- 2.6.10-v/drivers/ieee1394/sbp2.c	2004-12-24 13:34:00.000000000 
> > >-0800
> > >+++ 2.6.10/drivers/ieee1394/sbp2.c	2005-01-05 14:23:05.000000000 -0800
> > >@@ -902,8 +902,7 @@ alloc_fail:
> > >	 * connected to the sbp2 device being removed. That host would
> > >	 * have a certain amount of time to relogin before the sbp2 device
> > >	 * allows someone else to login instead. One second makes sense. */
> > >-	set_current_state(TASK_INTERRUPTIBLE);
> > >-	schedule_timeout(HZ);
> > >+	ssleep(1);
> > 
> > Maybe the current code is _deliberately_ accepting interruption by 
> > signals but trying to complete sbp2_probe() anyway. However it seems 
> > more plausible to me to abort the device probe, for example like this:
> > if (msleep_interruptible(1000)) {
> > 	sbp2_remove_device(scsi_id);
> > 	return -EINTR;
> > }
> 
> You might be right, but I'd like to get Ben's input on this, as I honeslty am

Don't hold your breath waiting for Ben's input. However, I would like to
get one of the two proposed committed and tested by more users as this
is a sore spot. I am not in a position at this time to fully research
and test to make a call.

> unsure. To be fair, I am trying to audit all usage of schedule_timeout() and the
> semantic interpretation (to me) of using TASK_INTERRUPTIBLE is that you wish to
> sleep a certain amount of time, but also are prepared for an early return on
> either signals or wait-queue events. msleep_interruptible() cleanly removes this
> second issue, but still requires the caller to respond appropriately if there is
> a return value. Hence, I like your change. I think it makes the most sense.
> Since I didn't/don't know how the device works, I was not able to make the
> change myself. Thanks for your input!

Sounds like a sign-off. Any other input before I request Stefan to make
the final decision?

> > Anyway, signal handling does not appear to be critical there.
> 
> Just out of curiousity, doesn't that run the risk, though, of
> signal_pending(current) being true for quite a bit of time following the
> timeout?

How much of this is "curiosity" vs a real risk?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2005-01-14  4:52       ` Dan Dennedy
@ 2005-01-14 11:16         ` Stefan Richter
  2005-01-19  6:27         ` [KJ] " Nish Aravamudan
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Richter @ 2005-01-14 11:16 UTC (permalink / raw)
  To: Linux1394-Devel; +Cc: Nishanth Aravamudan, kj, lkml

Dan Dennedy wrote:
> On Mon, 2005-01-10 at 09:39 -0800, Nishanth Aravamudan wrote:
>> On Sun, Jan 09, 2005 at 10:01:21AM +0100, Stefan Richter wrote:
>> > Nishanth Aravamudan wrote:
>> > >@@ -902,8 +902,7 @@ alloc_fail:
>> > >	 * connected to the sbp2 device being removed. That host would
>> > >	 * have a certain amount of time to relogin before the sbp2 device
>> > >	 * allows someone else to login instead. One second makes sense. */
>> > >-	set_current_state(TASK_INTERRUPTIBLE);
>> > >-	schedule_timeout(HZ);
>> > >+	ssleep(1);
>> > 
>> > Maybe the current code is _deliberately_ accepting interruption by 
>> > signals but trying to complete sbp2_probe() anyway. However it seems 
>> > more plausible to me to abort the device probe, for example like this:
>> > if (msleep_interruptible(1000)) {
>> > 	sbp2_remove_device(scsi_id);
>> > 	return -EINTR;
>> > }
[...]
>> I am trying to audit all usage of schedule_timeout() and the
>> semantic interpretation (to me) of using TASK_INTERRUPTIBLE is that you wish to
>> sleep a certain amount of time, but also are prepared for an early return on
>> either signals or wait-queue events. [...]
> 
> Sounds like a sign-off. Any other input before I request Stefan to make
> the final decision?

Don't count on me here. I do not even know /which/ situations might
introduce signals or wait queue events at this point. The only one that
occurred to me is when nodemgr is about to be killed. In this situation,
it is hardly beneficial to continue with the login. But there may be
other events I do not know about which should not result in sbp2 giving
up. Sorry, I should have been clear about this in my previous post.

>> > Anyway, signal handling does not appear to be critical there.

Or rather, it is not that important (although desirable) to always wait
for 1000ms. This is just necessary for when another initiator was logged
in into the target but did not reconnect or login again immediately
after a bus reset. (Assuming the other initiator or the local host or
the target require exclusive login, which is more common than concurrent
login.)

>> Just out of curiousity, doesn't that run the risk, though, of
>> signal_pending(current) being true for quite a bit of time following the
>> timeout?
> 
> How much of this is "curiosity" vs a real risk?

Well, what might those events be? May we hold them off for one second?
(Or perhaps even longer if we are about to login to several targets.)
Should sbp2 proceeed to login when such events occur? I can't answer
this for sure. Sorry,
-- 
Stefan Richter
-=====-=-=-= ---= -===-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [UPDATE PATCH] ide/ide-cd: use ssleep() instead of schedule_timeout()
  2005-01-07 19:47   ` Jens Axboe
@ 2005-01-15  0:58     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-01-15  0:58 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Nishanth Aravamudan, kj, lkml

applied

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [KJ] Re: [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout()
  2005-01-14  4:52       ` Dan Dennedy
  2005-01-14 11:16         ` Stefan Richter
@ 2005-01-19  6:27         ` Nish Aravamudan
  1 sibling, 0 replies; 11+ messages in thread
From: Nish Aravamudan @ 2005-01-19  6:27 UTC (permalink / raw)
  To: Dan Dennedy
  Cc: Nishanth Aravamudan, kj, Stefan Richter, Linux1394-Devel, lkml,
	Ben Collins

On Thu, 13 Jan 2005 23:52:55 -0500, Dan Dennedy <dan@dennedy.org> wrote:
> On Mon, 2005-01-10 at 09:39 -0800, Nishanth Aravamudan wrote:
> > On Sun, Jan 09, 2005 at 10:01:21AM +0100, Stefan Richter wrote:
> > > Nishanth Aravamudan wrote:
> > > >Description: Use ssleep() instead of schedule_timeout() to guarantee
> > > >the task
> > > >delays as expected. The existing code should not really need to run in
> > > >TASK_INTERRUPTIBLE, as there is no check for signals (or even an
> > > >early return
> > > >value whatsoever). ssleep() takes care of these issues.
> > >
> > > >--- 2.6.10-v/drivers/ieee1394/sbp2.c       2004-12-24 13:34:00.000000000
> > > >-0800
> > > >+++ 2.6.10/drivers/ieee1394/sbp2.c 2005-01-05 14:23:05.000000000 -0800
> > > >@@ -902,8 +902,7 @@ alloc_fail:
> > > >    * connected to the sbp2 device being removed. That host would
> > > >    * have a certain amount of time to relogin before the sbp2 device
> > > >    * allows someone else to login instead. One second makes sense. */
> > > >-  set_current_state(TASK_INTERRUPTIBLE);
> > > >-  schedule_timeout(HZ);
> > > >+  ssleep(1);
> > >
> > > Maybe the current code is _deliberately_ accepting interruption by
> > > signals but trying to complete sbp2_probe() anyway. However it seems
> > > more plausible to me to abort the device probe, for example like this:
> > > if (msleep_interruptible(1000)) {
> > >     sbp2_remove_device(scsi_id);
> > >     return -EINTR;
> > > }
> >
> > You might be right, but I'd like to get Ben's input on this, as I honeslty am
> 
> Don't hold your breath waiting for Ben's input. However, I would like to
> get one of the two proposed committed and tested by more users as this
> is a sore spot. I am not in a position at this time to fully research
> and test to make a call.
> 
> > unsure. To be fair, I am trying to audit all usage of schedule_timeout() and the
> > semantic interpretation (to me) of using TASK_INTERRUPTIBLE is that you wish to
> > sleep a certain amount of time, but also are prepared for an early return on
> > either signals or wait-queue events. msleep_interruptible() cleanly removes this
> > second issue, but still requires the caller to respond appropriately if there is
> > a return value. Hence, I like your change. I think it makes the most sense.
> > Since I didn't/don't know how the device works, I was not able to make the
> > change myself. Thanks for your input!
> 
> Sounds like a sign-off. Any other input before I request Stefan to make
> the final decision?

Yes, this is an ACK for Stefan's change. Although the exact code he
produced is not quite accurate. It would be most accurate to use

msleep_interruptible(1000);
if (signals_pending(current) {
       sbp2_remove_device(scsi_id);
       return -EINTR;
}

This accounts for the corner case when the sleep times out and a
signal comes between the second-to-last and last jiffies. Thanks for
both of your input! If you'd prefere me sending a new patch I can do
so from work tomorrow.
 
> > > Anyway, signal handling does not appear to be critical there.
> >
> > Just out of curiousity, doesn't that run the risk, though, of
> > signal_pending(current) being true for quite a bit of time following the
> > timeout?
> 
> How much of this is "curiosity" vs a real risk?

I think it should be ok, actually, the -EINTR should get passed back
to userspace, where it would be handled appropriately. I hope :)

-Nish

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-01-19  6:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-25  0:48 [announce] 2.6.10-kj Domen Puncer
2005-01-07 19:33 ` [UPDATE PATCH] atm/ambassador: use msleep() instead of schedule_timeout() Nishanth Aravamudan
2005-01-07 19:40 ` [UPDATE PATCH] ide/ide-cd: use ssleep() " Nishanth Aravamudan
2005-01-07 19:47   ` Jens Axboe
2005-01-15  0:58     ` Bartlomiej Zolnierkiewicz
2005-01-07 21:34 ` [UPDATE PATCH] ieee1394/sbp2: " Nishanth Aravamudan
2005-01-09  9:01   ` Stefan Richter
2005-01-10 17:39     ` Nishanth Aravamudan
2005-01-14  4:52       ` Dan Dennedy
2005-01-14 11:16         ` Stefan Richter
2005-01-19  6:27         ` [KJ] " Nish Aravamudan

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).