diff --git a/scst/README b/scst/README index fef7c78e1..ecc8baef8 100644 --- a/scst/README +++ b/scst/README @@ -245,13 +245,6 @@ in/out in Makefile: scsi_execute_async() function, you will get a warning message in the kernel log. - - CONFIG_SCST_HIGHMEM - if defined on HIGHMEM systems with 2.6 kernels, it - allows SCST to use HIGHMEM. This is very experimental feature, which - is currently broken and unsupported, since it is unclear, if it - brings something valuable, except some performance hit. Note, that - CONFIG_SCST_HIGHMEM isn't required for HIGHMEM systems and SCST will work - fine on them with SCST_HIGHMEM off. - - CONFIG_SCST_STRICT_SECURITY - if defined, makes SCST zero allocated data buffers. Undefining it (default) considerably improves performance and eases CPU load, but could create a security hole (information @@ -650,8 +643,7 @@ II. In order to get the maximum performance you should: 1. For SCST: - Disable in Makefile CONFIG_SCST_STRICT_SERIALIZING, CONFIG_SCST_EXTRACHECKS, - CONFIG_SCST_TRACING, DEBUG*, CONFIG_SCST_STRICT_SECURITY, - CONFIG_SCST_HIGHMEM + CONFIG_SCST_TRACING, DEBUG*, CONFIG_SCST_STRICT_SECURITY - For pass-through devices enable CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ. diff --git a/scst/ToDo b/scst/ToDo index 12bd37461..5b064fcb2 100644 --- a/scst/ToDo +++ b/scst/ToDo @@ -27,12 +27,6 @@ To be done - Move linear searches to hash-table based. - - HIGHMEM cleanup. Looks like HIGHMEM usage doesn't worth the effort and - performance hit, at least until VDISK handler doesn't use the page - cache directly, so disable it for now, although the code looks ready. - To enable it, set CONFIG_SCST_HIGHMEM in 1 in scst_priv.h. HIGHMEM is not - supported on 2.4 and is not going to be. - - Small ToDo's spread all over the code. - Investigate possible missed emulated UA cases. diff --git a/scst/include/scst.h b/scst/include/scst.h index 218b06787..09cf2ac26 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -27,9 +27,6 @@ #include #include -#ifdef CONFIG_SCST_HIGHMEM -#include -#endif #include #include #include @@ -2393,24 +2390,10 @@ static inline int __scst_get_buf(struct scst_cmd *cmd, uint8_t **buf) if ((i >= cmd->sg_cnt) || unlikely(sg == NULL)) goto out; -#ifdef CONFIG_SCST_HIGHMEM /* HIGHMEM isn't currently supported */ - /* - * HIGHMEM pages not merged (clustered), so if it's - * not HIGHMEM page, kmap() is the same as page_address() - */ - if (scst_cmd_atomic(cmd)) { - enum km_type km; - if (in_softirq()) - km = KM_SOFTIRQ0; - else - km = KM_USER0; - *buf = kmap_atomic(sg[i].page, km); - } else - *buf = kmap(sg[i].page); -#else + *buf = page_address(sg_page(&sg[i])); -#endif *buf += sg[i].offset; + res = sg[i].length; cmd->get_sg_buf_entry_num++; @@ -2432,20 +2415,7 @@ static inline int scst_get_buf_next(struct scst_cmd *cmd, uint8_t **buf) static inline void scst_put_buf(struct scst_cmd *cmd, void *buf) { -#ifdef CONFIG_SCST_HIGHMEM /* HIGHMEM isn't currently supported */ - if (cmd->sg_cnt) { - if (scst_cmd_atomic(cmd)) { - enum km_type km; - BUG_ON(in_irq()); - if (in_softirq()) - km = KM_SOFTIRQ0; - else - km = KM_USER0; - kunmap_atomic(buf, km); - } else - kunmap(buf); - } -#endif + /* Nothing to do */ } /* @@ -2454,13 +2424,7 @@ static inline void scst_put_buf(struct scst_cmd *cmd, void *buf) */ static inline int scst_get_buf_count(struct scst_cmd *cmd) { - int res; -#ifdef CONFIG_SCST_HIGHMEM - res = (cmd->bufflen >> PAGE_SHIFT) + 1; -#else - res = (cmd->sg_cnt == 0) ? 1 : cmd->sg_cnt; -#endif - return res; + return (cmd->sg_cnt == 0) ? 1 : cmd->sg_cnt; } /* diff --git a/scst/src/Makefile b/scst/src/Makefile index 3ad0e637b..ce567e38c 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -139,11 +139,6 @@ EXTRA_CFLAGS += -DCONFIG_SCST_DEBUG -g # enable it if you have strict security requirements. #EXTRA_CFLAGS += -DSCST_STRICT_SECURITY -# If defined, allows SCST to use HIGHMEM. It's unclear, if it brings -# something valuable, except performance hit in some cases, -# so let it be off. Untested and unsupported. -#EXTRA_CFLAGS += -DCONFIG_SCST_HIGHMEM - clean: rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend Modules.symvers \ Module.symvers Module.markers modules.order diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index ac64f1a02..6f70c55ea 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -28,10 +28,6 @@ #include #include -#ifdef CONFIG_SCST_HIGHMEM -#include -#endif - #include "scst.h" #include "scst_priv.h" #include "scst_mem.h" @@ -516,10 +512,6 @@ static struct scst_tgt_dev *scst_alloc_add_tgt_dev(struct scst_session *sess, if (sess->tgt->tgtt->unchecked_isa_dma || ini_unchecked_isa_dma) { scst_sgv_pool_use_dma(tgt_dev); - } else { -#ifdef CONFIG_SCST_HIGHMEM - scst_sgv_pool_use_highmem(tgt_dev); -#endif } if (dev->scsi_dev != NULL) { diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index d84079f73..c1791d0ed 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -40,13 +40,6 @@ details." #endif -#ifdef CONFIG_SCST_HIGHMEM -#error "CONFIG_SCST_HIGHMEM configuration isn't supported and broken, because\ - there is no real point to support it, at least it definitely isn't \ - worth the effort. Better use no-HIGHMEM kernel with VMSPLIT option \ - or in 64-bit configuration instead. See README file for details." -#endif - #if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && !defined(CONFIG_SCST_STRICT_SERIALIZING) #warning "Patch scst_exec_req_fifo-.patch was not applied on \ your kernel and CONFIG_SCST_STRICT_SERIALIZING isn't defined. Pass-through dev \ @@ -1592,11 +1585,6 @@ static void __init scst_print_config(void) (j == i) ? "" : ", "); #endif -#ifdef CONFIG_SCST_HIGHMEM - i += snprintf(&buf[i], sizeof(buf) - i, "%sSCST_HIGHMEM", - (j == i) ? "" : ", "); -#endif - if (j != i) PRINT_INFO("%s", buf); } diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 52279da41..7d56537be 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -27,10 +27,6 @@ #include #include -#ifdef CONFIG_SCST_HIGHMEM -#include -#endif - #include "scst.h" #include "scst_priv.h" #include "scst_mem.h" @@ -61,15 +57,6 @@ void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev) tgt_dev->pool = &sgv_pools_mgr.default_set.dma; } -#ifdef CONFIG_SCST_HIGHMEM -void scst_sgv_pool_use_highmem(struct scst_tgt_dev *tgt_dev) -{ - TRACE_MEM("%s", "Use HIGHMEM"); - tgt_dev->gfp_mask = __GFP_NOWARN | __GFP_HIGHMEM; - tgt_dev->pool = &sgv_pools_mgr.default_set.highmem; -} -#endif - static int scst_check_clustering(struct scatterlist *sg, int cur, int hint) { int res = -1; @@ -80,13 +67,6 @@ static int scst_check_clustering(struct scatterlist *sg, int cur, int hint) int full_page_cur = (len_cur & (PAGE_SIZE - 1)) == 0; unsigned long pfn, pfn_next, full_page; -#ifdef CONFIG_SCST_HIGHMEM - if (page >= highmem_start_page) { - TRACE_MEM("%s", "HIGHMEM page allocated, no clustering") - goto out; - } -#endif - #if 0 TRACE_MEM("pfn_cur %ld, pfn_cur_next %ld, len_cur %d, full_page_cur %d", pfn_cur, pfn_cur_next, len_cur, full_page_cur); @@ -1228,12 +1208,6 @@ int scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmark) if (res != 0) goto out_free_norm; -#ifdef CONFIG_SCST_HIGHMEM - res = sgv_pool_init(&pools->default_set.highmem, "sgv-high", 0); - if (res != 0) - goto out_free_dma; -#endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) INIT_DELAYED_WORK(&pools->mgr.apit_pool, (void (*)(struct work_struct *))sgv_pool_cached_pitbool); @@ -1254,11 +1228,6 @@ out: TRACE_EXIT_RES(res); return res; -#ifdef CONFIG_SCST_HIGHMEM -out_free_dma: - sgv_pool_deinit(&pools->default_set.dma); -#endif - out_free_norm: sgv_pool_deinit(&pools->default_set.norm); @@ -1281,9 +1250,6 @@ void scst_sgv_pools_deinit(void) cancel_delayed_work(&pools->mgr.apit_pool); -#ifdef CONFIG_SCST_HIGHMEM - sgv_pool_deinit(&pools->default_set.highmem); -#endif sgv_pool_deinit(&pools->default_set.dma); sgv_pool_deinit(&pools->default_set.norm); sgv_pool_deinit(&pools->default_set.norm_clust); diff --git a/scst/src/scst_mem.h b/scst/src/scst_mem.h index 0cf7fbf4d..c4ac12fe8 100644 --- a/scst/src/scst_mem.h +++ b/scst/src/scst_mem.h @@ -91,9 +91,6 @@ struct scst_sgv_pools_manager { struct { struct sgv_pool norm_clust, norm; struct sgv_pool dma; -#ifdef CONFIG_SCST_HIGHMEM - struct sgv_pool highmem; -#endif } default_set; struct sgv_pool_mgr { @@ -148,6 +145,3 @@ extern int sgv_pool_procinfo_show(struct seq_file *seq, void *v); void scst_sgv_pool_use_norm(struct scst_tgt_dev *tgt_dev); void scst_sgv_pool_use_norm_clust(struct scst_tgt_dev *tgt_dev); void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev); -#ifdef CONFIG_SCST_HIGHMEM -void scst_sgv_pool_use_highmem(struct scst_tgt_dev *tgt_dev); -#endif diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index 076b901f4..c5043afce 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -1772,10 +1772,6 @@ static int scst_version_info_show(struct seq_file *seq, void *v) seq_printf(seq, "SCST_STRICT_SECURITY\n"); #endif -#ifdef CONFIG_SCST_HIGHMEM - seq_printf(seq, "SCST_HIGHMEM\n"); -#endif - TRACE_EXIT(); return 0; }