From f0da641f63befcf4495d31523d73dcf312581f74 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 3 Oct 2008 18:09:00 +0000 Subject: [PATCH] Web updates. Particularly, "Contributing" page was added git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@509 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- www/contributing.html | 164 +++++++++++++++++++++++++++++++++++ www/downloads.html | 9 +- www/handler_fileio_tgt.html | 7 +- www/index.html | 16 ++-- www/scst_admin.html | 8 +- www/scst_pg.html | 7 +- www/scstvsstgt.html | 10 +-- www/sponsorship.html | 16 ++-- www/target_fcoe.html | 6 +- www/target_iscsi.html | 9 +- www/target_lsi.html | 5 +- www/target_old.html | 7 +- www/target_qla22xx_23xx.html | 7 +- www/target_qla_isp.html | 7 +- www/target_srp.html | 6 +- www/targets.html | 9 +- 16 files changed, 229 insertions(+), 64 deletions(-) create mode 100644 www/contributing.html diff --git a/www/contributing.html b/www/contributing.html new file mode 100644 index 000000000..0f11bfece --- /dev/null +++ b/www/contributing.html @@ -0,0 +1,164 @@ + + + + + + + + +SCST: Generic SCSI Target Middle Level for Linux + + + +
+ + +
+
+

Contributing to SCST

+ +

If you would like to contribute to SCST development, you can do in many ways: + +

    +
  • By reporting bugs or other problems.
  • +
  • By writing or updating various documentation to keep it complete and up to date.
  • +
  • By sending patches, which fix bugs or implement new functionality. + See below a list of possible SCST improvements with some possible + implementation ideas.
  • +
  • By sending donations. They would be spent on making SCST even better. +
+ +

Possible SCST improvements

+ +

Zero-copy FILEIO for READ-direction commands

+ +

At the moment, SCST in FILEIO mode uses standard Linux read() and write() syscalls paths, + which copy data from the page cache to the supplied buffer and back. Zero-copy FILEIO + would use page cache data directly. This would be a major performance improvement, + especially for fast hardware, like Infiniband, because it would eliminate the data copy + latency. This proposal is limited for READs only, because for WRITEs it is a lot harder to + implement, so it is worth to do zero-copy for READs and WRITEs separately. + +

The main idea is to add one more flag to filp_open() "flags" parameter + (like O_RDONLY, O_DIRECT, etc.) O_ZEROCOPY, which would be available + only if the caller is from the kernel space . In this case fd->f_op->readv(), + do_sync_readv_writev(), etc. would receive as the pointer to data + buffer not a real data buffer, but pointer to an empty SG vector. Then: + +

    +
  • Generic buffer allocation in SCST would not be used, instead vdisk_parse() + would allocate the SG vector, but wouldn't fill it with actual pages.
  • + +
  • In generic_file_aio_read(), if O_ZEROCOPY flag was set, + function do_generic_file_read() would be called with the last parameter set + to a pointer to new function file_zero_copy_read_actor() instead of file_read_actor().
  • + +
  • Function file_zero_copy_read_actor() would be basically the same as + file_read_actor(), but, instead of copy data using __copy_to_user*() functions, + it would add the supplied page to the appropriate place in the received in + desc->arg.buf SG vector and reference, i.e. page_get(), that page.
  • + +
  • In vdisk_devtype.on_free_cmd(), which doesn't exist yet, all pages + from the SG vector would be dereferenced, i.e. page_put(). Then the SG vector itself + would be freed.
  • +
+ +

That's all. For WRITEs the current code path would remain unchanged. + +

Zero-copy FILEIO for WRITE-direction commands

+ +

Implementation should be similar to zero-copy FILEIO for READ commands. All + incoming data should be inserted in the page cache, then dereferenced in + vdisk_devtype.on_free_cmd(). The main problem is insertion of data pages in the + page cache, namely, locking issues related to it. They should be carefully + investigated. + +

Persistent reservations

+ +

Support for PERSISTENT RESERVE IN and PERSISTENT RESERVE OUT is required to + work in many cluster environments, e.g. Windows 2003 Cluster. + +

For implementation you should use scst_reserve_local() and + scst_release_local() as a base. You should store all reservation keys + for in files in /var/scst, one file per device + (it would allow to eliminate additional locking), like + /var/scst/boot_disk for device "boot_disk" and load them in memory, when + device would be registered. + +

In the first version it can be done for virtual + devices only and reject PERSISTENT RESERVE IN and OUT commands for + pass-through devices with "COMMAND NOT SUPPORTED" sense data. + +

Automatic sessions reassignment

+ +

At the moment, if security name for an initiator reassigned (moved) to another security + group, the existing sessions from that initiator are not automatically reassigned to + the new security group, i.e. they remain in the old one. The only ways to reassign them + are either sessions restart, or restart of the corresponding target driver. Both in many + cases are not options. + +

To implement that you should on event of any group change: +

    +
  • Globally suspend all activities by scst_suspend_activity().
  • + +
  • Go over all existing sessions. For each find the corresponding ACG + (see scst_init_session() as an example) and check if it's the same as the existing + one. If it's the same, then go to the next session. Otherwise, reassign + it to the new ACG. For that you should go over all devices in the group/session + pair (tgt_dev's) and delete not existing in the new ACG tgt_dev's, + add new ones and keep the existing ones.
  • + +
  • Resume the activities.
  • +
+ +

Dynamic I/O flow control

+ +

At the moment, if an initiator or several initiators simultaneously send to + target too many commands, especially in seek intensive workloads, target can get + overloaded and not able to finish commands on time. In such cases you can see on + the initiator(s) messages about aborting commands or resetting the target. See in SCST core + README section "What if target's backstorage is too slow" for more details. + To fix this problem it is necessary to implement a dynamic I/O flow control in + SCST core. + +

The flow control, generally, is quite simple. Each SCST command has timeout value, + which is set by the corresponding dev handler. SCST core should keep device's queue depth + at the level that the worst command's execution time, i.e. time between scst_rx_cmd() + and scst_finish_cmd(), would be between something like timeout/10 and timeout/5. + So, commands execution time should be checked and: + +

    +
  • If it's > timeout/5, then the new queue depth should be set to max(1, + cur_depth/2)
  • + +
  • If it's < timeout/10, then new queue depth should be set to min(MAX_DEPTH, + cur_depth+1). This shouldn't be done too often, once in a few minutes should be + sufficient
  • +
+
+
+ + + + + + diff --git a/www/downloads.html b/www/downloads.html index e0e8afda7..090160da0 100644 --- a/www/downloads.html +++ b/www/downloads.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -79,16 +80,14 @@ - - - + - \ No newline at end of file + diff --git a/www/handler_fileio_tgt.html b/www/handler_fileio_tgt.html index 9b59d2177..547ab2c9d 100644 --- a/www/handler_fileio_tgt.html +++ b/www/handler_fileio_tgt.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -71,16 +72,14 @@ - - - + diff --git a/www/index.html b/www/index.html index c0600d8ce..9675c37d8 100644 --- a/www/index.html +++ b/www/index.html @@ -22,6 +22,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -99,16 +100,16 @@
  • Pass-through mode with one to many relationship, i.e. when multiple initiators can connect to the exported pass-through devices, for virtually all SCSI devices types: disks (type 0), tapes (type 1), processors (type 3), CDROMs (type 5), MO disks (type 7), medium changers (type 8) and RAID - controllers (type 0xC)
  • + controllers (type 0xC).
  • FILEIO mode, which allows to use files on file systems or block devices as virtual - remotely available SCSI disks or CDROMs with benefits of the Linux page cache
  • + remotely available SCSI disks or CDROMs with benefits of the Linux page cache.
  • BLOCKIO mode, which performs direct block IO with a block device, bypassing page-cache for all operations. This mode works ideally with high-end storage HBAs and for applications that either do not need caching between application and disk or need the large block throughput.
  • User space mode using scst_user device handler, which allows to implement in the - user space virtual SCSI devices in the SCST environment
  • + user space virtual SCSI devices in the SCST environment.
  • "Performance" device handlers, which provide in pseudo pass-through mode a way for - direct performance measurements without overhead of actual data transferring from/to underlying SCSI device + direct performance measurements without overhead of actual data transferring from/to underlying SCSI device.
  • @@ -139,12 +140,11 @@ - - + - \ No newline at end of file + diff --git a/www/scst_admin.html b/www/scst_admin.html index 48aa58db3..f949d1981 100644 --- a/www/scst_admin.html +++ b/www/scst_admin.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -67,15 +68,14 @@ - - - + + diff --git a/www/scst_pg.html b/www/scst_pg.html index f7519fbfa..a220470b6 100644 --- a/www/scst_pg.html +++ b/www/scst_pg.html @@ -23,6 +23,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -1092,11 +1093,11 @@ - + - \ No newline at end of file + diff --git a/www/scstvsstgt.html b/www/scstvsstgt.html index 8c8a487eb..8d4239e1d 100644 --- a/www/scstvsstgt.html +++ b/www/scstvsstgt.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -70,16 +71,15 @@ - + - - + - \ No newline at end of file + diff --git a/www/sponsorship.html b/www/sponsorship.html index 432fdb573..647c39c47 100644 --- a/www/sponsorship.html +++ b/www/sponsorship.html @@ -22,6 +22,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -47,7 +48,11 @@

    Thus, you can speed up a LOT all the works related to SCST inclusion in the mainline kernel by sponsoring it. - Ultimately, you can make them a full time work. + The needed financial amount is quite low, just for one person for several months. + In this time all current showstoppers, like /proc based interface, as well as + all problems found during future public reviews should be fixed. + Even half of this amount would allow to work half full time exclusively on + SCST integration into Linux kernel. Funds can be on one time or per month basis.

    Investing in SCST integration in Linux kernel, you investing not only in making Linux the best storage OS, but, if your company @@ -55,16 +60,17 @@ future of your product and, hence, your company.

    If you are interested, please contact Vladislav Bolkhovitin <vst at vlnb net> - + +

    - - + + diff --git a/www/target_fcoe.html b/www/target_fcoe.html index b941d31b1..6cc299d66 100644 --- a/www/target_fcoe.html +++ b/www/target_fcoe.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -67,12 +68,11 @@ - - \ No newline at end of file + diff --git a/www/target_iscsi.html b/www/target_iscsi.html index b9a942c5e..527dd9c58 100644 --- a/www/target_iscsi.html +++ b/www/target_iscsi.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -125,16 +126,14 @@ - - - + - \ No newline at end of file + diff --git a/www/target_lsi.html b/www/target_lsi.html index c57238827..0c913489c 100644 --- a/www/target_lsi.html +++ b/www/target_lsi.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -68,7 +69,7 @@ @@ -89,16 +90,14 @@ - - - \ No newline at end of file + diff --git a/www/target_qla22xx_23xx.html b/www/target_qla22xx_23xx.html index 3a35d1b41..6736cc77d 100644 --- a/www/target_qla22xx_23xx.html +++ b/www/target_qla22xx_23xx.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -68,16 +69,14 @@ - - - \ No newline at end of file + diff --git a/www/target_qla_isp.html b/www/target_qla_isp.html index 3b7afb0d2..1f9f48275 100644 --- a/www/target_qla_isp.html +++ b/www/target_qla_isp.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -72,16 +73,14 @@ - - - \ No newline at end of file + diff --git a/www/target_srp.html b/www/target_srp.html index 118c1a9ee..0dfad56e4 100644 --- a/www/target_srp.html +++ b/www/target_srp.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -71,12 +72,11 @@ - - \ No newline at end of file + diff --git a/www/targets.html b/www/targets.html index 86524bd92..78e1c6a0f 100644 --- a/www/targets.html +++ b/www/targets.html @@ -24,6 +24,7 @@
  • Main
  • Drivers
  • Downloads
  • +
  • Contributing
  • SCST vs STGT
  • @@ -65,16 +66,14 @@ - - - + - \ No newline at end of file +