Bart Van Assche
02d6dc9860
Functional changes:
...
- Changed default value for the kernel module parameter thread from 0 to 1 because mode 0 can trigger soft lockup complaints under sufficient load.
- Changed default value for the kernel module parameter srpt_autodetect_cred_req from false to true.
Non-functional changes:
- Removed several superfluous casts in ib_srpt.c.
Performance-related changes:
- Rearranged if/then/else statements such that the most frequently executed code occurs first.
- When SCST_MAX_TGT_DEV_COMMANDS > 128, the SRP receive queue size is now SCST_MAX_TGT_DEV_COMMANDS instead of 128.
Bug fixes:
- Fixed performance bug in modes thread=0 and 2.
- Fixed a bug in IB send queue overflow handling.
- Fixed race related to IB completion thread creation (mode thread=1).
- Made sure that the following warning is no longer triggered during module removal:
WARNING: at fs/proc/generic.c:825 remove_proc_entry+0x261/0x2f0()
Call Trace:
[<ffffffff8104d74b>] warn_slowpath_common+0x7b/0xc0
[<ffffffff8104d7f1>] warn_slowpath_fmt+0x41/0x50
[<ffffffff8116e8a1>] remove_proc_entry+0x261/0x2f0
[<ffffffff810832c8>] ? debug_check_no_locks_freed+0xc8/0x150
[<ffffffff81082ecb>] ? mark_held_locks+0x6b/0xa0
[<ffffffff8110f95f>] ? kfree+0xcf/0x180
[<ffffffff810831a5>] ? trace_hardirqs_on_caller+0x145/0x190
[<ffffffff810831fd>] ? trace_hardirqs_on+0xd/0x10
[<ffffffffa05835c2>] srpt_unregister_procfs_entry+0x22/0x40 [ib_srpt]
[<ffffffffa0583aba>] srpt_release+0x8a/0x1a0 [ib_srpt]
[<ffffffffa04cbcc0>] scst_unregister_target+0x70/0x3f0 [scst]
[<ffffffff811bf6d7>] ? kobject_put+0x27/0x60
[<ffffffff8126ff67>] ? put_device+0x17/0x20
[<ffffffffa058587e>] srpt_remove_one+0xee/0x1a0 [ib_srpt]
[<ffffffffa03ddfc5>] ib_unregister_client+0x65/0x120 [ib_core]
[<ffffffffa0588f43>] srpt_cleanup_module+0x5f/0xc3 [ib_srpt]
[<ffffffff8108e8dd>] sys_delete_module+0x1bd/0x280
[<ffffffff8135e5ad>] ? retint_swapgs+0xe/0x13
[<ffffffff810831a5>] ? trace_hardirqs_on_caller+0x145/0x190
[<ffffffff810030db>] system_call_fastpath+0x16/0x1b
---[ end trace 3fc26663490f6a89 ]---
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-01 14:40:54 +00:00
Bart Van Assche
1590390350
Reordered two fields in struct srpt_rdma_ch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-01 12:47:00 +00:00
Bart Van Assche
d402b1e851
Command abortion bug fix.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 15:28:56 +00:00
Bart Van Assche
b9c3b09613
Checkpatch fix.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1898 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 15:03:04 +00:00
Bart Van Assche
7ef2bc926e
Made ib_srpt_compl kernel thread logging more detailed.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:53:22 +00:00
Bart Van Assche
02cfb12400
Fixed a bug in the algorithm that decides when to send SRP_CRED_REQ.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:45:41 +00:00
Bart Van Assche
ffe7409533
Changed behavior of mode thread=1: IB completions are now entirely processed on thread context and there is now one thread per session instead of one thread for all sessions.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1895 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:32:44 +00:00
Bart Van Assche
49cbea848a
Dynamically decrease the initiator's SRP queue depth if it supports SRP_CRED_REQ and scst_get_max_lun_commands(NULL, 0) (48 with unmodified scst_priv.h) is less than SRPT_RQ_SIZE (128 with unmodified ib_srpt.h).
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1894 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 11:26:40 +00:00
Mark Buechler
0857c68f7d
- Be less verbose with the 'enabled' attribute.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1893 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 16:44:32 +00:00
Mark Buechler
32d9107dfd
Big changes.
...
1. Simplify attribute setting to use a generic setAttributes()
function for anything requiring non-dynamic attributes.
2. Reorder function argument to always be the same as their
associated SCST::SCST methods.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1892 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 15:27:24 +00:00
Bart Van Assche
9ce80877d2
Added support for SRP_CRED_REQ and auto-detection of initiator SRP_CRED_REQ support (disabled by default).
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1891 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 14:21:16 +00:00
Vladislav Bolkhovitin
7fe6c4e1af
Fix 2 problems noticed by Chandra Seetharaman <sekharan@us.ibm.com>:
...
1. isns_get_ip() getnameinfo error Temporary failure in name resolution!
2. isns_handle() unknown function 8006 4 4c00 6 0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1890 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 11:37:44 +00:00
Vladislav Bolkhovitin
f16f6864e5
Fixed truncating the last char while writing to filename attribute
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1889 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 11:16:29 +00:00
Vladislav Bolkhovitin
2d9343958b
Patch from Benjamin Yates <benjamin@rqdq.com> improving archlinux pkgbuild build.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1888 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 18:44:06 +00:00
Vladislav Bolkhovitin
f1313dfc7e
Minor compiler warnings cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1887 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 18:41:46 +00:00
Mark Buechler
dddcae1418
- Set driver and handler attributes on commit as well.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1886 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 15:36:06 +00:00
Mark Buechler
eb124ec057
- Properly handling of auto-enabled targets/drivers while
...
reading a deprecated config file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 14:46:41 +00:00
Mark Buechler
96aaba2829
- Create targets from old Default_ groups for all drivers
...
capable of dynamic target creation.
- While converting an old config file, set 'enabled' to 1 for
all non-qla drivers which have the 'enabled' attribute so
their targets can become enabled as well.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1884 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 14:06:57 +00:00
Mark Buechler
95072429d8
- Don't tream an hash like an array.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1883 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 13:27:56 +00:00
Bart Van Assche
f299b1d2b3
Micro-optimization: replaced a spinlock by an atomic variable.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 10:15:33 +00:00
Vladislav Bolkhovitin
ecaabfc08c
Patch fixing sparse warnings related to digest calculation
...
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1881 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 18:34:07 +00:00
Bart Van Assche
803a312144
Replaced busy-waiting for more credits by wait_for_completion().
...
Moved processing delay loop out of interrupt context.
Preparations for SRP_CRED_REQ support and run-time receive queue selection.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1880 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:23:45 +00:00
Bart Van Assche
8873db3eb6
Split a line.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:07:30 +00:00
Vladislav Bolkhovitin
a12a944d3a
Consider only enabled targets for rel_tgt_id comparison
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 11:06:59 +00:00
Vladislav Bolkhovitin
a554b2dda6
Minor sysfs fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 10:55:44 +00:00
Bart Van Assche
747511e3b8
IB verbs compliance fix: drain the completion queues before destroying them.
...
Moved some thread=1 related functions in ib_srpt.c such that these are grouped in the source file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 13:13:45 +00:00
Bart Van Assche
0925119ad8
Made sure that invocation of srpt_pending_cmd_timeout() after
...
srpt_handle_rdma_comp() finished and before srpt_xmit_response() started works
properly.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:34:20 +00:00
Bart Van Assche
1c64261bec
Increased default send queue size from 2048 to 4096 and made the send queue
...
size configurable via the kernel module parameter srpt_sq_size.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:15:10 +00:00
Bart Van Assche
95bba60a0a
Fixed a bug in the command abortion logic that could result rmmod ib_srpt to hang.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 16:47:29 +00:00
Bart Van Assche
ef509acbd8
Refined the timeout error message.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 11:46:29 +00:00
Bart Van Assche
dc80bce266
Fixed a race between initiator and target in the algorithm for computing the REQUEST LIMIT DELTA value sent in responses towards the initiator that could cause the initiators req_lim value temporarily to exceed 128 (SRPT_RQ_SIZE). While harmless, this caused messages like "ib_srpt: ***ERROR***: req_lim = -1 < 0" to appear in the target kernel log.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1871 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 08:35:28 +00:00
Bart Van Assche
a9d5ab6737
Added --group_reporting.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:59 +00:00
Bart Van Assche
06b4f6d8aa
Increased SRP initiator lockup safety margin, fixed a sparse warning and added more comments.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:55 +00:00
Bart Van Assche
7322ff6c24
Added an additional test.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:25:54 +00:00
Bart Van Assche
c7472c2aa6
Made sure that ib_srp initiator cannot lock up even when its I/O depth > 1.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:23:39 +00:00
Bart Van Assche
baa4b4ee29
Fixed a bug that caused trouble while handling send completions for failed data transfer commands. An example of the call stack that could be logged:
...
WARNING: at srpt/src/ib_srpt.c:2908 srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]()
[ ... ]
Call Trace:
<IRQ> [<ffffffffa0317827>] ? srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]
[<ffffffff8023885a>] ? warn_slowpath_common+0x77/0x8e
[<ffffffffa0317827>] ? srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]
[<ffffffffa03178f1>] ? srpt_handle_send_comp+0x57/0x7d [ib_srpt]
[<ffffffffa0319c18>] ? srpt_send_completion+0x82/0xca [ib_srpt]
[<ffffffffa024f646>] ? mlx4_cq_completion+0x21/0x62 [mlx4_core]
[<ffffffffa025051e>] ? mlx4_eq_int+0x55/0x2a4 [mlx4_core]
[<ffffffffa025077c>] ? mlx4_msi_x_interrupt+0xf/0x17 [mlx4_core]
[<ffffffff8023cff6>] ? tasklet_action+0x64/0xb5
[<ffffffff802675f9>] ? handle_IRQ_event+0x53/0x105
[<ffffffff802690ac>] ? handle_edge_irq+0xda/0x11a
[<ffffffff8020db65>] ? handle_irq+0x81/0x8a
[<ffffffff8020d399>] ? do_IRQ+0x57/0xbf
[<ffffffff8020c2d3>] ? ret_from_intr+0x0/0xa
<EOI> [<ffffffff80211ca6>] ? mwait_idle+0xa3/0xd1
[<ffffffff8051ac1a>] ? notifier_call_chain+0x29/0x4c
[<ffffffff8020aa61>] ? cpu_idle+0x40/0x5e
---[ end trace fef4d0c17ebda700 ]---
------------[ cut here ]------------
kernel BUG at /usr/src/redhat/BUILD/kernel-2.6.30.10/arch/x86/include/asm/dma-mapping.h:104!
invalid opcode: 0000 [#1 ] SMP
[ ... ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 07:38:15 +00:00
Bart Van Assche
5da3fc1f1b
Rewrote four #if statements such that these can be parsed by scripts/generate-kernel-patch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1865 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 07:24:27 +00:00
Vladislav Bolkhovitin
04556369b4
- Fix 2 lockdep complains
...
- Preliminary update for 2.6.35
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 17:38:51 +00:00
Mark Buechler
7bfbb41963
- When reading deprecated config files, don't configure empty groups.
...
- Minor formatting fix in writeConfiguration().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 16:29:27 +00:00
Mark Buechler
f896acc78c
- Forgot to rename sysfs to scstadmin.sysfs.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:59:08 +00:00
Mark Buechler
be6f9f219b
- Rename sysfs and procfs to better names.
...
- Specify module use version for procfs scstadmin.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:51:08 +00:00
Mark Buechler
253c80692e
- Integrate scstadmin's Makefile with enable_proc and
...
disable_proc so the correct scstadmin version is
installed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:47:16 +00:00
Richard Sharpe
5737910fb4
Put in a clearer work-around for the problem with the size of the max_cmd_size
...
field. The size changed at 2.6.26 from unsigned char to unsigned short.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 09:40:14 +00:00
Bart Van Assche
380d63a33e
Updated performance measurements.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1858 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 08:32:50 +00:00
Bart Van Assche
34bab4bc58
Micro-optimized the IB completion handlers for modes thread=0 and thread=2.
...
Fixed another session unregistration race.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1857 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 07:43:17 +00:00
Bart Van Assche
5c6a0c9e17
Fixed bug in 'svn status -v' output parser.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 07:23:26 +00:00
Bart Van Assche
a8d02fbfca
Enabled rdy_to_xfer_atomic for mode thread=0.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 05:54:55 +00:00
Mark Buechler
627b323dbe
- Missed a spot where scst base attributes are getting written
...
even if they aren't key attributes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 20:26:47 +00:00
Mark Buechler
6f8dfe947f
- Handle Default and Default_ groups. Default_X groups will not
...
be configured if the associated target X has not been pre-configured.
- Misc. fixes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 17:24:48 +00:00
Richard Sharpe
8668b22ae8
Set max_cmd_len correctly depending on the size of the field. In earlier
...
versions of Linux it was an unsigned char, and a value of 260 means 4 after a compiler warning. Added a comment to describe what is going on as well. Since
this is done very infequently it should not cause performance problems and
means that it will not silently fail to work if people try to use it on kernels
earlier than 2.6.26. If I figure out what kernel version the change was made
in we could use an ifdef.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 16:08:34 +00:00